Go to the source code of this file.
Data Structures | |
struct | regselstate_t |
Defines | |
#define | DEV_MAX 2 |
#define | CH_MAX 2 |
#define | USART_DEVICE0_I2C_ADDR 0x48 |
#define | USART_DEVICE1_I2C_ADDR 0x49 |
#define | REGADDR(regsel, ch) (((regsel)<<3)|(((ch)&1)<<1)) |
#define | XTAL 1843200 |
#define | INIT_BAUDRATE 19200 |
Enumerations | |
enum | { EEFBIT = 0x01, TCRBIT = 0x02, DEFSEL = 0x00, TCRSEL = 0x20, SRSSEL = 0x40, ERSSEL = 0x80, REGSEL_MASK = 0xf0 } |
enum | Sc16is752Regs_t { RHR = 0, THR = 0, IER = 1, IIR = 2, FCR = 2, LCR = 3, MCR = 4, LSR = 5, MSR = 6, SPR = 7, TCR, TLR, TXLVL = 8, RXLVL = 9, IODir = 10, IOState = 11, IOIntEna = 12, IOControl = 14, EFCR = 15, DLL, DLH, EFR, XON1, XON2, XOFF1, XOFF2 } |
Functions | |
void | Sc16is752UsartEnable (uint8_t dev, uint8_t ch) |
Carefully enable USART hardware functions. | |
void | Sc16is752UsartDisable (uint8_t dev, uint8_t ch) |
Carefully disable USART hardware functions. | |
uint32_t | Sc16is752UsartGetSpeed (uint8_t dev, uint8_t ch) |
Query the USART hardware for the selected speed. | |
int | Sc16is752UsartSetSpeed (uint32_t rate, uint8_t dev, uint8_t ch) |
Set the USART hardware bit rate. | |
uint8_t | Sc16is752UsartGetDataBits (uint8_t dev, uint8_t ch) |
Query the USART hardware for the number of data bits. | |
int | Sc16is752UsartSetDataBits (uint8_t bits, uint8_t dev, uint8_t ch) |
Set the USART hardware to the number of data bits. | |
uint8_t | Sc16is752UsartGetParity (uint8_t dev, uint8_t ch) |
Query the USART hardware for the parity mode. | |
int | Sc16is752UsartSetParity (uint8_t mode, uint8_t dev, uint8_t ch) |
Set the USART hardware to the specified parity mode. | |
uint8_t | Sc16is752UsartGetStopBits (uint8_t dev, uint8_t ch) |
Query the USART hardware for the number of stop bits. | |
int | Sc16is752UsartSetStopBits (uint8_t bits, uint8_t dev, uint8_t ch) |
Set the USART hardware to the number of stop bits. | |
uint32_t | Sc16is752UsartGetStatus (uint8_t dev, uint8_t ch) |
Query the USART hardware status. | |
int | Sc16is752UsartSetStatus (uint32_t flags, uint8_t dev, uint8_t ch) |
Set the USART hardware status. | |
uint8_t | Sc16is752UsartGetClockMode (uint8_t dev, uint8_t ch) |
Query the USART hardware for synchronous mode. | |
int | Sc16is752UsartSetClockMode (uint8_t mode, uint8_t dev, uint8_t ch) |
Set asynchronous or synchronous mode. | |
uint32_t | Sc16is752UsartGetFlowControl (uint8_t dev, uint8_t ch) |
Query flow control mode. | |
int | Sc16is752UsartSetFlowControl (uint32_t flags, uint8_t dev, uint8_t ch) |
Set flow control mode. | |
void | Sc16is752UsartTxStart (uint8_t dev, uint8_t ch) |
Start the USART transmitter hardware. | |
void | Sc16is752UsartRxStart (uint8_t dev, uint8_t ch) |
Start the USART receiver hardware. | |
int | Sc16is752UsartInit (uint8_t dev, uint8_t ch, NUTDEVICE *nutDev, IRQ_HANDLER *irq) |
Initialize the USART hardware driver. | |
int | Sc16is752UsartDeinit (uint8_t dev, uint8_t ch, IRQ_HANDLER *irq) |
Deinitialize the USART hardware driver. |
#define DEV_MAX 2 |
#define CH_MAX 2 |
#define USART_DEVICE0_I2C_ADDR 0x48 |
#define USART_DEVICE1_I2C_ADDR 0x49 |
#define REGADDR | ( | regsel, | |
ch | |||
) | (((regsel)<<3)|(((ch)&1)<<1)) |
#define XTAL 1843200 |
#define INIT_BAUDRATE 19200 |
Referenced by Sc16is752UsartInit().
enum Sc16is752Regs_t |