Universal Asynchronous Receiver Transmitter driver using dsPIC MCUs.
More...
|
file | uart1.c |
| This is the generated driver source file for the UART1 driver.
|
|
file | uart1.h |
| This is the generated driver header file for the UART1 driver.
|
|
file | uart_types.h |
| This is the generated driver types header file for the UART driver.
|
|
|
const struct UART_INTERFACE | UART1_Drv |
| Structure object of type UART_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. UART1 can be changed by the user in the UART user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.
|
|
◆ UART1_Drv_AutoBaudEventEnableGet
◆ UART1_Drv_AutoBaudQuery
◆ UART1_Drv_AutoBaudSet
◆ UART1_Drv_BaudRateGet
◆ UART1_Drv_BaudRateSet
◆ UART1_Drv_BRGCountGet
◆ UART1_Drv_BRGCountSet
◆ UART1_Drv_Deinitialize
◆ UART1_Drv_ErrorGet
◆ UART1_Drv_Initialize
◆ UART1_Drv_IsRxReady
◆ UART1_Drv_IsTxDone
◆ UART1_Drv_IsTxReady
◆ UART1_Drv_Read
◆ UART1_Drv_TransmitDisable
◆ UART1_Drv_TransmitEnable
◆ UART1_Drv_Write
◆ UART1_AutoBaudEventEnableGet()
bool UART1_AutoBaudEventEnableGet |
( |
void | | ) |
|
- Parameters
-
- Returns
- true - Auto-Baud is enabled
-
false - Auto-Baud is disabled
Definition at line 248 of file uart1.c.
◆ UART1_AutoBaudQuery()
bool UART1_AutoBaudQuery |
( |
void | | ) |
|
- Parameters
-
- Returns
- true - Auto-Baud detection in progress or counter overflow occurred
-
false - Auto-Baud detection is complete or disabled
Definition at line 243 of file uart1.c.
◆ UART1_AutoBaudSet()
void UART1_AutoBaudSet |
( |
bool | enable | ) |
|
- Parameters
-
[in] | enable | - true, starts the auto-baud detection
|
[in] | enable | - false, disables the auto-baud detection
|
- Returns
- none
Definition at line 236 of file uart1.c.
◆ UART1_BaudRateGet()
uint32_t UART1_BaudRateGet |
( |
void | | ) |
|
- Parameters
-
- Returns
- Actual baud-rate of UART1
Definition at line 325 of file uart1.c.
◆ UART1_BaudRateSet()
void UART1_BaudRateSet |
( |
uint32_t | baudRate | ) |
|
- Parameters
-
[in] | baudRate | - Value of Baud-Rate to be set
|
- Returns
- none
- Note
- Make sure the is no transmission in progress using UART1_IsTxDone function
Definition at line 299 of file uart1.c.
◆ UART1_BRGCountGet()
uint32_t UART1_BRGCountGet |
( |
void | | ) |
|
- Parameters
-
- Returns
- Combined BRG value upto 20 bits
Definition at line 289 of file uart1.c.
◆ UART1_BRGCountSet()
void UART1_BRGCountSet |
( |
uint32_t | brgValue | ) |
|
- Parameters
-
[in] | baudRate | - BRG value upto 20 bits
|
- Returns
- none
- Note
- Make sure the is no transmission in progress using UART1_IsTxDone function
Definition at line 283 of file uart1.c.
◆ UART1_Deinitialize()
void UART1_Deinitialize |
( |
void | | ) |
|
- Parameters
-
- Returns
- none
Definition at line 176 of file uart1.c.
◆ UART1_ErrorGet()
size_t UART1_ErrorGet |
( |
void | | ) |
|
- Parameters
-
- Returns
- Errors with masking as per UART1_ERROR_MASKS
Definition at line 253 of file uart1.c.
◆ UART1_Initialize()
void UART1_Initialize |
( |
void | | ) |
|
- Parameters
-
- Returns
- none
Set the UART1 module to the options selected in the user interface. Make sure to set LAT bit corresponding to TxPin as high before UART initialization
Definition at line 104 of file uart1.c.
◆ UART1_IsRxReady()
bool UART1_IsRxReady |
( |
void | | ) |
|
- Parameters
-
- Returns
- true - Data available to read
-
false - Data not available to read
Definition at line 211 of file uart1.c.
◆ UART1_IsTxDone()
bool UART1_IsTxDone |
( |
void | | ) |
|
- Parameters
-
- Returns
- true - All bytes transferred
-
false - Data transfer is pending
Definition at line 221 of file uart1.c.
◆ UART1_IsTxReady()
bool UART1_IsTxReady |
( |
void | | ) |
|
- Parameters
-
- Returns
- true - Data can be written
-
false - Data can not be written
Definition at line 216 of file uart1.c.
◆ UART1_Read()
uint8_t UART1_Read |
( |
void | | ) |
|
- Precondition
- UART1_Initialize function should have been called before calling this function. The transfer status should be checked to see if the receiver is not empty before calling this function.
- Parameters
-
- Returns
- A data byte received by the driver
Definition at line 186 of file uart1.c.
◆ UART1_TransmitDisable()
void UART1_TransmitDisable |
( |
void | | ) |
|
- Parameters
-
- Returns
- none
Definition at line 231 of file uart1.c.
◆ UART1_TransmitEnable()
void UART1_TransmitEnable |
( |
void | | ) |
|
- Parameters
-
- Returns
- none
Definition at line 226 of file uart1.c.
◆ UART1_Write()
void UART1_Write |
( |
uint8_t | data | ) |
|
- Precondition
- UART1_Initialize function should have been called before calling this function. The transfer status should be checked to see if transmitter is not full before calling this function.
- Parameters
-
[in] | data | - Data byte to write to the UART1 |
- Returns
- none
Definition at line 201 of file uart1.c.
◆ UART1_Drv