#ifndef _aplmt_devices_serial_haluartaapi_h_ #define _aplmt_devices_serial_haluartaapi_h_ /*---------------------------------------------------------------------------- ** SUMMARY: APLMT Hardware Abstraction Layer for UART-A Interface (HALUARTA) ** ** DESCRIPTION: ** This file describes an abstraction layer of basic UART primitives that ** are platform specific in its implemenation. ** ** ** CONFIGURATION ** ------------- ** COMPILE: none. ** ** APPLICATION: none. ** ** PLATFORM: none. ** ----------------------------------------------------------------------------*/ #include "apl/types/types.h" /* For: basic types */ #include "platform/haluartaapi.h" /* For: target config and/or overrides */ /*-------------- PUBLISHED API ---------------------------------------------*/ /** This method places the specified byte in to the transmit data register and initiates a transmit sequence. Prototype: void Aplmt_halUartATransmitByte(AplByte byteToTransmit); */ #define Aplmt_halUartATransmitByte _Aplmt_halUartATransmitByte /** This method clears the Tx Interrupt request. This method can be empty/null if the loadind the data register clears the IRQ. Prototype: void Aplmt_halUartAClrTxIrq(void); */ #define Aplmt_halUartAClrTxIrq _Aplmt_halUartAClrTxIrq /** This method enables the UART transmitter Prototype: void Aplmt_halUartAEnableTx(void); */ #define Aplmt_halUartAEnableTx _Aplmt_halUartAEnableTx /** This method disables the UART transmitter Prototype: void Aplmt_halUartADisableTx(void); */ #define Aplmt_halUartADisableTx _Aplmt_halUartADisableTx /** This method enables the UART Transmit Data register emtpy interrupt Prototype: void Aplmt_halUartAEnableTxIrq(void); */ #define Aplmt_halUartAEnableTxIrq _Aplmt_halUartAEnableTxIrq /** This method disables the UART Transmit Data register empty interrupt Prototype: void Aplmt_halUartAEnableTxIrq(void); */ #define Aplmt_halUartADisableTxIrq _Aplmt_halUartADisableTxIrq /** This method return non-zero (true) if the 'current' UART interrupt request is a tx-data-register-empty interrupt. Prototype: AplBool Aplmt_halUartAIsTxIrq(void); */ #define Aplmt_halUartAIsTxIrq _Aplmt_halUartAIsTxIrq /*-------------- PUBLISHED API ---------------------------------------------*/ /** This method returns the last received byte, independent of any Rx errors Prototype: AplByte Aplmt_halUartAGetRxByte(void)l */ #define Aplmt_halUartAGetRxByte _Aplmt_halUartAGetRxByte /** This method clears the Rx Interrupt request. This method can be empty/null if the reading the received byte clears the IRQ. Prototype: void Aplmt_halUartAClrRxIrq(void); */ #define Aplmt_halUartAClrRxIrq _Aplmt_halUartAClrRxIrq /** This method returns non-zero (true) if any Rx error (framing, overrung, parity, etc.) has occurred on the 'current' byte Prototype: AplByte Aplmt_halUartAIsRxError(void); */ #define Aplmt_halUartAIsRxError _Aplmt_halUartAIsRxError /** This method clears ALL Rx errors for the 'current' byte. Prototype: void Aplmt_halUartAClrRxErrors(void); */ #define Aplmt_halUartAClrRxErrors _Aplmt_halUartAClrRxErrors /** This method enables the UART receiver Prototype: void Aplmt_halUartAEnableRx(void); */ #define Aplmt_halUartAEnableRx _Aplmt_halUartAEnableRx /** This method disables the UART receiver Prototype: void Aplmt_halUartADisableRx(void); */ #define Aplmt_halUartADisableRx _Aplmt_halUartADisableRx /** This method enables the UART Receive data interrupt. Prototype: void Aplmt_halUartAEnableRxIrq(void); */ #define Aplmt_halUartAEnableRxIrq _Aplmt_halUartAEnableRxIrq /** This method disables the UART Receive data interrupt. Prototype: void Aplmt_halUartADisableRxIrq(void); */ #define Aplmt_halUartADisableRxIrq _Aplmt_halUartADisableRxIrq /** This method return non-zero (true) if the 'current' UART interrupt request is a unread-data-in-the-rx-data-registe interrupt. Prototype: AplBool Aplmt_halUartAIsRxIrq(void) */ #define Aplmt_halUartAIsRxIrq _Aplmt_halUartAIsRxIrq /*-------------- PUBLISHED API ---------------------------------------------*/ /** This method enables the external baud rate generator for the UART. Not all platforms and/or UARTs support this feature. Check your platform's documentation before using. Prototype: void Aplmt_halUartAEnableExternalBaud(void); */ #define Aplmt_halUartAEnableExternalBaud _Aplmt_halUartAEnableExternalBaud /** This method disables the external baud rate generator for the UART. Not all platforms and/or UARTs support this feature. Check your platform's documentation before using. Prototype: void Aplmt_halUartADisableExternalBaud(void); */ #define Aplmt_halUartADisableExternalBaud _Aplmt_halUartADisableExternalBaud /*--------------------------------------------------------------------------*/ #endif /* end _aplmt_devices_serial_haluartaapi_h_ */