RA Flexible Software Package Documentation  Release v5.9.0

 
PTX NSC Platform API

Functions

void ptxPLAT_DisableInterrupts (struct ptxPlat *plat)
 Disable Interrupts. More...
 
void ptxPLAT_EnableInterrupts (struct ptxPlat *plat)
 Enable Interrupts. More...
 
uint8_t ptxPLAT_CheckRxActive (struct ptxPlat *plat)
 Check if PLAT interface reception is taking place at the moment. More...
 

Detailed Description

Data Structures

struct  ptxPLAT_ConfigPars_t
 Platform-specific parameter initializers. More...
 

Macros

#define PTX_INTF_SPI
 
#define PTX_PLAT_TRX_FLAGS_I2C_RESTART_CONDITION
 Platform-specific flags parameter initializers. More...
 
#define PTX_PLAT_HOST_SPEED_I2C_100000
 Platform-dependent I2C speeds/bitrates (Attention: Bitrates highly dependent on the target system and might require adaption!) More...
 
#define PTX_PLAT_HOST_SPEED_I2C_400000
 
#define PTX_PLAT_HOST_SPEED_I2C_1000000
 
#define PTX_PLAT_HOST_SPEED_I2C_3400000
 
#define PTX_PLAT_HOST_SPEED_I2C_MAX
 
#define PTX_PLAT_HOST_SPEED_UART_9600
 Platform-dependent UART speeds/bitrates (Attention: Bitrates highly dependent on the target system and might require adaption!) More...
 
#define PTX_PLAT_HOST_SPEED_UART_14400
 
#define PTX_PLAT_HOST_SPEED_UART_19200
 
#define PTX_PLAT_HOST_SPEED_UART_28800
 
#define PTX_PLAT_HOST_SPEED_UART_38400
 
#define PTX_PLAT_HOST_SPEED_UART_57600
 
#define PTX_PLAT_HOST_SPEED_UART_115200
 
#define PTX_PLAT_HOST_SPEED_UART_230400
 
#define PTX_PLAT_HOST_SPEED_UART_460800
 
#define PTX_PLAT_HOST_SPEED_UART_921600
 
#define PTX_PLAT_HOST_SPEED_UART_1843200
 
#define PTX_PLAT_HOST_SPEED_UART_3000000
 
#define PTX_PLAT_HOST_SPEED_UART_MAX
 
#define PTX_PLAT_HOST_DEFAULT_UART_SPEED
 
#define PTX_PLAT_HOST_SPEED_SPI_1M
 Platform-dependent SPI speeds/bitrates (Attention: Bitrates highly dependent on the target system and might require adaption!) More...
 
#define PTX_PLAT_HOST_SPEED_SPI_5M
 
#define PTX_PLAT_HOST_SPEED_SPI_10M
 
#define PTX_PLAT_HOST_SPEED_SPI_MAX
 

Typedefs

typedef void(* pptxPlat_RxCallBack_t) (void *ctx)
 Callback function for IRQ triggered (asynchronously).
 
typedef void(* pptxPlat_TimerCallBack_t) (void *ctx)
 Callback function for Timer Interrupt.
 

Data Structure Documentation

◆ ptxPLAT_ConfigPars_t

struct ptxPLAT_ConfigPars_t

Platform-specific parameter initializers.

Data Fields
uint32_t Speed

Interface Speed (SPI, I2C or UART -> see PTX_PLAT_HOST_SPEED* below.

uint8_t DeviceAddress

Interface Device-Address (I2C only).

Macro Definition Documentation

◆ PTX_INTF_SPI

#define PTX_INTF_SPI

Adding this define for the SDK in place of pre-processor macro

◆ PTX_PLAT_TRX_FLAGS_I2C_RESTART_CONDITION

#define PTX_PLAT_TRX_FLAGS_I2C_RESTART_CONDITION

Platform-specific flags parameter initializers.

Bit 0 ....: I2C: Restart-Condition required after Write-operation or not. Bit 1 - 3.: RFU Bit 4 - 7.: Custom Flags (free to use)I2C: If set, the restart condition should be issued after the write operation.

◆ PTX_PLAT_HOST_SPEED_I2C_100000

#define PTX_PLAT_HOST_SPEED_I2C_100000

Platform-dependent I2C speeds/bitrates (Attention: Bitrates highly dependent on the target system and might require adaption!)

I2C Standard (100 kHz).

◆ PTX_PLAT_HOST_SPEED_I2C_400000

#define PTX_PLAT_HOST_SPEED_I2C_400000

I2C Fast-Mode (400 kHz).

◆ PTX_PLAT_HOST_SPEED_I2C_1000000

#define PTX_PLAT_HOST_SPEED_I2C_1000000

I2C Fast-Mode-Plus (up to 1 MHz).

◆ PTX_PLAT_HOST_SPEED_I2C_3400000

#define PTX_PLAT_HOST_SPEED_I2C_3400000

I2C High-Speed-Mode (up to 3.4 MHz).

◆ PTX_PLAT_HOST_SPEED_I2C_MAX

#define PTX_PLAT_HOST_SPEED_I2C_MAX

I2C Max. Speed/Bitrate

◆ PTX_PLAT_HOST_SPEED_UART_9600

#define PTX_PLAT_HOST_SPEED_UART_9600

Platform-dependent UART speeds/bitrates (Attention: Bitrates highly dependent on the target system and might require adaption!)

UART 9600 Baud.

◆ PTX_PLAT_HOST_SPEED_UART_14400

#define PTX_PLAT_HOST_SPEED_UART_14400

UART 14400 Baud.

◆ PTX_PLAT_HOST_SPEED_UART_19200

#define PTX_PLAT_HOST_SPEED_UART_19200

UART 19200 Baud.

◆ PTX_PLAT_HOST_SPEED_UART_28800

#define PTX_PLAT_HOST_SPEED_UART_28800

UART 28800 Baud.

◆ PTX_PLAT_HOST_SPEED_UART_38400

#define PTX_PLAT_HOST_SPEED_UART_38400

UART 38400 Baud.

◆ PTX_PLAT_HOST_SPEED_UART_57600

#define PTX_PLAT_HOST_SPEED_UART_57600

UART 57600 Baud.

◆ PTX_PLAT_HOST_SPEED_UART_115200

#define PTX_PLAT_HOST_SPEED_UART_115200

UART 115200 Baud.

◆ PTX_PLAT_HOST_SPEED_UART_230400

#define PTX_PLAT_HOST_SPEED_UART_230400

UART 230400 Baud.

◆ PTX_PLAT_HOST_SPEED_UART_460800

#define PTX_PLAT_HOST_SPEED_UART_460800

UART 460800 Baud.

◆ PTX_PLAT_HOST_SPEED_UART_921600

#define PTX_PLAT_HOST_SPEED_UART_921600

UART 921600 Baud.

◆ PTX_PLAT_HOST_SPEED_UART_1843200

#define PTX_PLAT_HOST_SPEED_UART_1843200

UART 1843200 Baud.

◆ PTX_PLAT_HOST_SPEED_UART_3000000

#define PTX_PLAT_HOST_SPEED_UART_3000000

UART 3000000 Baud.

◆ PTX_PLAT_HOST_SPEED_UART_MAX

#define PTX_PLAT_HOST_SPEED_UART_MAX

UART Max. Speed/Bitrate

◆ PTX_PLAT_HOST_DEFAULT_UART_SPEED

#define PTX_PLAT_HOST_DEFAULT_UART_SPEED

UART default Speed after reset.

◆ PTX_PLAT_HOST_SPEED_SPI_1M

#define PTX_PLAT_HOST_SPEED_SPI_1M

Platform-dependent SPI speeds/bitrates (Attention: Bitrates highly dependent on the target system and might require adaption!)

SPI 1 MBit/s.

◆ PTX_PLAT_HOST_SPEED_SPI_5M

#define PTX_PLAT_HOST_SPEED_SPI_5M

SPI 5 MBit/s.

◆ PTX_PLAT_HOST_SPEED_SPI_10M

#define PTX_PLAT_HOST_SPEED_SPI_10M

SPI 10 MBit/s.

◆ PTX_PLAT_HOST_SPEED_SPI_MAX

#define PTX_PLAT_HOST_SPEED_SPI_MAX

SPI Max. Speed/Bitrate

Function Documentation

◆ ptxPLAT_DisableInterrupts()

void ptxPLAT_DisableInterrupts ( struct ptxPlat *  plat)

Disable Interrupts.

This is used to disable IRQs from the underlying HW-platform.

Parameters
[in]platPointer to an initialized component structure.

◆ ptxPLAT_EnableInterrupts()

void ptxPLAT_EnableInterrupts ( struct ptxPlat *  plat)

Enable Interrupts.

This is used to (re-)enable IRQs from the underlying HW-platform.

Parameters
[in]platPointer to an initialized component structure.

◆ ptxPLAT_CheckRxActive()

uint8_t ptxPLAT_CheckRxActive ( struct ptxPlat *  plat)

Check if PLAT interface reception is taking place at the moment.

Note
The function is called in message reception loop after WFI -after CPU exits Sleep mode. This is relevant for UART interface since reception is interrupt driven (every byte received in ISR) and race condition might occur while checking if message has been received. If there is Rx activity on UART, WFI does not get called anymore in that loop. For other interfaces this function call always returns 0 and CPU enters sleep mode in every iteration.
Parameters
[in]platPointer to an initialized component structure.
Returns
Rx status: 0 - no rx activity, 1 - rx activity ongoing.