Typedefs | |
typedef void * | xComPortHandle |
Enumerations | |
enum | eBaud { ser50, ser75, ser110, ser134, ser150, ser200, ser300, ser600, ser1200, ser1800, ser2400, ser4800, ser9600, ser19200, ser38400, ser57600, ser115200 } |
enum | eCOMPort { serCOM1, serCOM2, serCOM3, serCOM4, serCOM5, serCOM6, serCOM7, serCOM8 } |
enum | eDataBits { serBITS_5, serBITS_6, serBITS_7, serBITS_8 } |
enum | eParity { serNO_PARITY, serODD_PARITY, serEVEN_PARITY, serMARK_PARITY, serSPACE_PARITY } |
enum | eStopBits { serSTOP_1, serSTOP_2 } |
Functions | |
unsigned portSHORT | usUsartPutString (xComPortHandle pxPort, const signed portCHAR *const pcString, unsigned portSHORT usStringLength) |
Put a string to Usart. More... | |
void | vSerialClose (xComPortHandle xPort) |
Close the serial port. More... | |
void | vUSART0_ISR (void) |
signed portBASE_TYPE | xUsartGetChar (xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime) |
Get char from Usart. More... | |
xComPortHandle | xUsartInit (eCOMPort UsartId, unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxRxQueueLength, unsigned portBASE_TYPE uxTxQueueLength) |
Init the serial port. More... | |
signed portBASE_TYPE | xUsartPutChar (xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime) |
Put char to Usart. More... | |
typedef void* xComPortHandle |
enum eBaud |
enum eCOMPort |
enum eDataBits |
enum eParity |
enum eStopBits |
unsigned portSHORT usUsartPutString | ( | xComPortHandle | pxPort, |
const signed portCHAR *const | pcString, | ||
unsigned portSHORT | usStringLength | ||
) |
Put a string to Usart.
pxPort | The Usart handle to put the string to |
pcString | The string to transmit |
usStringLength | The number of char to transmit. |
References pdPASS, serNO_BLOCK, and xUsartPutChar().
Referenced by ustracedump_Print(), vcom1shell_PrintMsg(), and vtracedump_PrintBlocking().
void vSerialClose | ( | xComPortHandle | xPort | ) |
Close the serial port.
xPort | The handle of the usart to close |
References usartPrivateData::usart.
Referenced by v_com1shell_stopResources(), and v_tracedump_stopResources().
References prvUSART_ISR_NonNakedBehaviour().
Referenced by xUsartInit().
signed portBASE_TYPE xUsartGetChar | ( | xComPortHandle | pxPort, |
signed portCHAR * | pcRxedChar, | ||
portTickType | xBlockTime | ||
) |
Get char from Usart.
pxPort | The Usart handle to get the char from |
pcRxedChar | The rxed char(output) |
xBlockTime | The max time to wait for a rxed char |
References pdFALSE, pdTRUE, xQueueReceive, and usartPrivateData::xRxedChars.
Referenced by com1shell_GetChar(), and prvGetChar().
xComPortHandle xUsartInit | ( | eCOMPort | UsartId, |
unsigned portLONG | ulWantedBaud, | ||
unsigned portBASE_TYPE | uxRxQueueLength, | ||
unsigned portBASE_TYPE | uxTxQueueLength | ||
) |
Init the serial port.
UsartId | The identifier of the Usart to init. |
ulWantedBaud | The required baudrate. |
uxRxQueueLength | The length of the Rx buffer (if 0, rx is not supported). |
uxTxQueueLength | The length of the Tx buffer (if 0, tx is not supported). |
Configure USART.
References usart_options_t::baudrate, CP_PBA_SPEED, gpio_enable_module_pin(), INTC_register_interrupt(), iprvSerialCreateQueues(), pdFAIL, serCOM1, serINVALID_COMPORT_HANDLER, usartPrivateData::usart, USART_1_STOPBIT, usart_init_rs232(), USART_NO_PARITY, USART_NORMAL_CHMODE, vUSART0_ISR(), vUSART1_ISR(), usartPrivateData::xCharsForTx, usartPrivateData::xRxedChars, and xUsart1.
Referenced by itracedump_Init(), and portTASK_FUNCTION().
signed portBASE_TYPE xUsartPutChar | ( | xComPortHandle | pxPort, |
signed portCHAR | cOutChar, | ||
portTickType | xBlockTime | ||
) |
Put char to Usart.
pxPort | The Usart handle to put the char to |
cOutChar | The char to transmit |
xBlockTime | The max time to wait for getting the right to transmit the char. |
References pdFAIL, pdPASS, usartPrivateData::usart, usartPrivateData::xCharsForTx, and xQueueSend.
Referenced by usUsartPutString(), vcom1shell_PutChar(), vtracedump_Putchar(), and vtracedump_Putchar_Block().