49#ifndef COMPS_PLAT_PTXPLAT_H_
50#define COMPS_PLAT_PTXPLAT_H_
79#define PTX_PLAT_TRX_FLAGS_I2C_RESTART_CONDITION 0x01
115#define PTX_PLAT_HOST_SPEED_I2C_100000 (100000UL)
116#define PTX_PLAT_HOST_SPEED_I2C_400000 (400000UL)
117#define PTX_PLAT_HOST_SPEED_I2C_1000000 (1000000UL)
118#define PTX_PLAT_HOST_SPEED_I2C_3400000 (3400000UL)
119#define PTX_PLAT_HOST_SPEED_I2C_MAX PTX_PLAT_HOST_SPEED_I2C_3400000
124#define PTX_PLAT_HOST_SPEED_UART_9600 (9600UL)
125#define PTX_PLAT_HOST_SPEED_UART_14400 (14400UL)
126#define PTX_PLAT_HOST_SPEED_UART_19200 (19200UL)
127#define PTX_PLAT_HOST_SPEED_UART_28800 (28800UL)
128#define PTX_PLAT_HOST_SPEED_UART_38400 (38400UL)
129#define PTX_PLAT_HOST_SPEED_UART_57600 (57600UL)
130#define PTX_PLAT_HOST_SPEED_UART_115200 (115200UL)
131#define PTX_PLAT_HOST_SPEED_UART_230400 (230400UL)
132#define PTX_PLAT_HOST_SPEED_UART_460800 (460800UL)
133#define PTX_PLAT_HOST_SPEED_UART_921600 (921600UL)
134#define PTX_PLAT_HOST_SPEED_UART_1843200 (1843200UL)
135#define PTX_PLAT_HOST_SPEED_UART_3000000 (3000000UL)
136#define PTX_PLAT_HOST_SPEED_UART_MAX PTX_PLAT_HOST_SPEED_UART_3000000
137#define PTX_PLAT_HOST_DEFAULT_UART_SPEED PTX_PLAT_HOST_SPEED_UART_115200
142#define PTX_PLAT_HOST_SPEED_SPI_1M (1000000UL)
143#define PTX_PLAT_HOST_SPEED_SPI_5M (5000000UL)
144#define PTX_PLAT_HOST_SPEED_SPI_10M (10000000UL)
145#define PTX_PLAT_HOST_SPEED_SPI_MAX PTX_PLAT_HOST_SPEED_SPI_10M
147#if defined (PTX_INTF_UART)
151#define PTX_PLAT_RXBUF_SIZE (256U)
222ptxStatus_t ptxPLAT_TRx(
struct ptxPlat *plat, uint8_t *txBuf[],
size_t txLen[],
size_t numTxBuffers, uint8_t *rxBuf[],
size_t *rxLen[],
size_t numRxBuffers, uint8_t flags);
420#if defined (PTX_INTF_UART)
431ptxStatus_t ptxPLAT_SetIntfSpeed(
struct ptxPlat *plat, uint32_t speed);
443uint32_t ptxPLAT_GetIntfSpeed(
struct ptxPlat *plat);
454ptxStatus_t ptxPLAT_SetCleanStateRx (
struct ptxPlat *plat);
467ptxStatus_t ptxPLAT_GetReceivedMessage (
struct ptxPlat *plat, uint8_t *rxMessageBuffer,
size_t *rxMessageBufferLen);
ptxStatus_t ptxPLAT_TriggerRx(struct ptxPlat *plat)
It triggers Rx Operation from PTX100X (If rx operation pending)
ptxStatus_t ptxPLAT_ResetChip(struct ptxPlat *plat)
Resets PTX1K.
ptxStatus_t ptxPLAT_GetInitializedTimer(struct ptxPlat *plat, struct ptxPlatTimer **timer)
Get an initialized timer.
ptxStatus_t ptxPLAT_AllocAndInit(struct ptxPlat **plat, struct ptxPLAT_ConfigPars *initParams)
Allocate and initialize the PLAT context.
void(* pptxPlat_TimerCallBack_t)(void *ctx)
Callback function for Timer Interrupt.
Definition ptxPLAT.h:101
ptxStatus_t ptxPLAT_WaitForInterrupt(struct ptxPlat *plat)
Wait for any kind of interrupt to be triggered on the CPU. (Blocking)
ptxStatus_t ptxPLAT_Sleep(struct ptxPlat *plat, uint32_t sleep_ms)
Sleep software execution.
ptxStatus_t ptxPLAT_TRx(struct ptxPlat *plat, uint8_t *txBuf[], size_t txLen[], size_t numTxBuffers, uint8_t *rxBuf[], size_t *rxLen[], size_t numRxBuffers, uint8_t flags)
Send and receive content of multiple buffers through the physical interface to the PTX1K.
void ptxPLAT_DisableInterrupts(struct ptxPlat *plat)
Disable Interrupts.
ptxStatus_t ptxPLAT_TimerStart(struct ptxPlat *plat, struct ptxPlatTimer *timer, uint32_t ms, uint8_t isBlock, pptxPlat_TimerCallBack_t fnISRCb, void *ISRCxt)
Start timer for some milliseconds.
void ptxPLAT_EnableInterrupts(struct ptxPlat *plat)
Enable Interrupts.
uint8_t ptxPLAT_CheckRxActive(struct ptxPlat *plat)
Check if PLAT interface reception is taking place at the moment.
struct ptxPLAT_ConfigPars ptxPLAT_ConfigPars_t
Platform-specific parameter initializers.
void(* pptxPlat_RxCallBack_t)(void *ctx)
Callback function for IRQ triggered (asynchronously).
Definition ptxPLAT.h:95
ptxStatus_t ptxPLAT_TimerDeinit(struct ptxPlat *plat, struct ptxPlatTimer *timer)
De initialize the timer.
ptxStatus_t ptxPLAT_TimerIsElapsed(struct ptxPlat *plat, struct ptxPlatTimer *timer, uint8_t *isElapsed)
Get Elapse state of the timer.
ptxStatus_t ptxPLAT_Deinit(struct ptxPlat *plat)
De-initialize the PLAT context.
ptxStatus_t ptxPLAT_StopWaitForRx(struct ptxPlat *plat)
Stop the waiting for IRQ.
ptxStatus_t ptxPLAT_IsRxPending(struct ptxPlat *plat, uint8_t *isRxPending)
It checks if Rx Operation is pending from PTX100X.
ptxStatus_t ptxPLAT_StartWaitForRx(struct ptxPlat *plat, pptxPlat_RxCallBack_t irqCb, void *ctxIrqCb)
Start waiting for IRQ to be triggered.(Not-blocking)
uint16_t ptxStatus_t
Status Type.
Definition ptxStatus.h:70
Platform-specific parameter initializers.
Definition ptxPLAT.h:107
uint8_t DeviceAddress
Definition ptxPLAT.h:109
uint32_t Speed
Definition ptxPLAT.h:108