Files | |
file | cuda_adb.h |
file | font-8x16.c |
file | font-8x16.h |
file | s3c24xx_ts.h |
Samsung S3C24xx on-chip ADC and touch-screen interface driver. | |
file | s3c24xx_uart.h |
Samsung S3C24xx on-chip UART driver. | |
Data Structures | |
struct | adb_dev_t |
struct | cuda_instance_t |
struct | cuda_t |
struct | s3c24xx_adc_io_t |
S3C24xx ADC and touch-screen I/O. More... | |
struct | s3c24xx_ts_t |
S3C24xx touchscreen driver instance. More... | |
struct | s3c24xx_uart_io_t |
S3C24xx UART I/O. More... | |
struct | s3c24xx_uart_t |
S3C24xx UART instance. More... | |
Defines | |
#define | ADCCON_ECFLG 0x8000 |
#define | ADCCON_ENABLE_START 0x0001 |
#define | ADCCON_PRSCEN 0x4000 |
#define | ADCCON_PRSCVL(val) (((val) & 0xff) << 6) |
#define | ADCCON_READ_START 0x0002 |
#define | ADCCON_SEL_MUX(smux) (((smux) & 7) << 3) |
#define | ADCCON_STDBM 0x0004 |
#define | ADCDAT_AUTO_PST 0x4000 |
#define | ADCDAT_UPDOWN 0x8000 |
#define | ADCTSC_AUTO_PST 0x0004 |
#define | ADCTSC_DSUD_UP 0x0100 |
#define | ADCTSC_PULLUP_DISABLE 0x0008 |
#define | ADCTSC_XM_ENABLE 0x0020 |
#define | ADCTSC_XP_DISABLE 0x0010 |
#define | ADCTSC_XY_PST_MASK 0x0003 |
#define | ADCTSC_XY_PST_NOOP 0x0000 |
#define | ADCTSC_XY_PST_WAITINT 0x0003 |
#define | ADCTSC_XY_PST_X 0x0001 |
#define | ADCTSC_XY_PST_Y 0x0002 |
#define | ADCTSC_YM_ENABLE 0x0080 |
#define | ADCTSC_YP_DISABLE 0x0040 |
#define | ADCUPDN_TSC_DN 0x0001 |
#define | ADCUPDN_TSC_UP 0x0002 |
#define | FONT_GLYPHS 2899 |
#define | FONT_SCANLINES 16 |
#define | FONT_WIDTH 8 |
#define | NAME "cuda_adb" |
#define | S3C24XX_TS_ADDR 0x58000000 |
Touchscreen I/O address. | |
#define | S3C24XX_TS_INR 31 |
Touchscreen interrupt number. | |
#define | S3C24XX_UFSTAT_RX_COUNT 0x002f |
#define | S3C24XX_UFSTAT_RX_FULL 0x0040 |
#define | S3C24XX_UFSTAT_TX_FULL 0x4000 |
#define | S3C24XX_UTRSTAT_RDATA 0x1 |
#define | S3C24XX_UTRSTAT_TX_EMPTY 0x4 |
#define | SMUX_AIN0 0 |
#define | SMUX_AIN1 1 |
#define | SMUX_AIN2 2 |
#define | SMUX_AIN3 3 |
#define | SMUX_XM 6 |
#define | SMUX_XP 7 |
#define | SMUX_YM 4 |
#define | SMUX_YP 5 |
#define | UCON_RX_INT_LEVEL 0x100 |
#define | UFCON_FIFO_ENABLE 0x01 |
#define | UFCON_RX_FIFO_TLEVEL_1B 0x00 |
#define | UFCON_TX_FIFO_TLEVEL_EMPTY 0x00 |
Enumerations | |
enum | |
B register fields. | |
enum | |
IER register fields. | |
enum | |
ACR register fields. | |
enum | |
Packet types. | |
enum | |
CUDA packet types. | |
enum | |
enum | |
enum | cuda_xfer_state |
enum | ts_state_t |
enum | ts_updn_t |
Functions | |
static void | adb_packet_handle (uint8_t *data, size_t size, bool autopoll) |
static void | cuda_autopoll_set (bool enable) |
static void | cuda_connection (ipc_callid_t iid, ipc_call_t *icall) |
Character device connection handler. | |
static int | cuda_init (void) |
static void | cuda_irq_handler (ipc_callid_t iid, ipc_call_t *call) |
static void | cuda_irq_listen (void) |
Interrupt in listen state. | |
static void | cuda_irq_rcv_end (void *buf, size_t *len) |
Interrupt in rcv_end state. | |
static void | cuda_irq_receive (void) |
Interrupt in receive state. | |
static void | cuda_irq_send (void) |
Interrupt in send state. | |
static void | cuda_irq_send_start (void) |
Interrupt in send_start state. | |
static void | cuda_packet_handle (uint8_t *buf, size_t len) |
static void | cuda_send_start (void) |
uint16_t | fb_font_glyph (const wchar_t ch) |
Convert character to font glyph index. | |
int | main (int argc, char *argv[]) |
Main entry point. | |
Variables | |
static adb_dev_t | adb_dev [ADB_MAX_ADDR] |
static cuda_instance_t | cinst |
static irq_cmd_t | cuda_cmds [] |
static irq_code_t | cuda_irq_code |
static cuda_t * | dev |
uint8_t | fb_font [FONT_GLYPHS][FONT_SCANLINES] |
uint8_t | fb_font [FONT_GLYPHS][FONT_SCANLINES] |
static cuda_instance_t * | instance = &cinst |
static void cuda_irq_listen | ( | void | ) | [static] |
static void cuda_irq_rcv_end | ( | void * | buf, | |
size_t * | len | |||
) | [static] |
Interrupt in rcv_end state.
Terminate packet reception. Either go back to listen state or start receiving another packet if CUDA has one for us.
Definition at line 367 of file cuda_adb.c.
static void cuda_irq_receive | ( | void | ) | [static] |
static void cuda_irq_send | ( | void | ) | [static] |
Interrupt in send state.
Send next byte or terminate transmission.
Definition at line 417 of file cuda_adb.c.
static void cuda_irq_send_start | ( | void | ) | [static] |
Interrupt in send_start state.
Process result of sending first byte (and send second on success).
Definition at line 391 of file cuda_adb.c.
uint16_t fb_font_glyph | ( | const wchar_t | ch | ) |
Convert character to font glyph index.
The font does not cover all Unicode characters. This function converts the character to an appropriate glyph in the font or returns an index to the question mark glyph if no specific glyph exists.
Definition at line 46 of file font-8x16.c.
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Main entry point.
[in] | argc | Nmber of arguments in argv vector (ignored). |
[in] | argv | Cmdline argument vector (ignored). |
Definition at line 143 of file cuda_adb.c.