This component implements hardware drivers that are necessary for RdLib software modules.
More...
|
typedef float | float32_t |
| 32 bit floating point
|
|
#define | __float32_t_defined |
|
This component implements hardware drivers that are necessary for RdLib software modules.
§ PH_COMP_DRIVER
#define PH_COMP_DRIVER 0xF100U |
§ PH_COMP_MASK
#define PH_COMP_MASK 0xFF00U |
Component Mask for status code and component ID.
§ PH_COMPID_MASK
#define PH_COMPID_MASK 0x00FFU |
ID Mask for component ID.
§ PH_ERR_MASK
#define PH_ERR_MASK 0x00FFU |
Error Mask for status code.
§ PH_COMP_GENERIC
#define PH_COMP_GENERIC 0x0000U |
§ PH_DRIVER_SUCCESS
#define PH_DRIVER_SUCCESS 0x0000 |
Generic Status codes.
All functions within the phDriver use these macro values as return codes.Function executed successfully.
§ PH_DRIVER_TIMEOUT
#define PH_DRIVER_TIMEOUT 0x0001 |
No reply received, e.g.
PICC removal.
§ PH_DRIVER_ABORTED
#define PH_DRIVER_ABORTED 0x0012 |
Used when HAL ShutDown is called.
§ PH_DRIVER_ERROR
#define PH_DRIVER_ERROR 0x0080 |
Invalid Parameter, buffer overflow or other configuration error.
§ PH_DRIVER_FAILURE
#define PH_DRIVER_FAILURE 0x0081 |
Failed to perform the requested operation.
§ PH_DRIVER_PULL_DOWN
#define PH_DRIVER_PULL_DOWN 0x00 |
Pin pull-up and pull-down settings.
Pull-down selected.
§ PH_DRIVER_PULL_UP
#define PH_DRIVER_PULL_UP 0x01 |
§ phStatus_t
phStatus_t is a signed short value, using the positive range.
High byte: Category (group) Identifier.
Low byte : Error Specifier.
§ pphDriver_InterruptCallBck_t
typedef void(* pphDriver_InterruptCallBck_t) (void) |
Interrupt callback interface which will be called when interrupt is triggered on IRQ Pin.
- Return values
-
§ pphDriver_TimerCallBck_t
typedef void(* pphDriver_TimerCallBck_t) (void) |
Timer callback interface which will be called when timer expires.
- Return values
-
§ phDriver_Pin_Func_t
Port/GPIO PIN functionality.
Enumerator |
---|
PH_DRIVER_PINFUNC_INPUT | Input pinpad.
|
PH_DRIVER_PINFUNC_OUTPUT | Output pinpad.
|
PH_DRIVER_PINFUNC_BIDIR | Bidirectional pinpad.
|
PH_DRIVER_PINFUNC_INTERRUPT | Interrupt pin.
|
§ phDriver_Interrupt_Config_t
PIN Interrupt configuration.
Enumerator |
---|
PH_DRIVER_INTERRUPT_LEVELZERO | Interrupt when level zero.
|
PH_DRIVER_INTERRUPT_LEVELONE | Interrupt when level one.
|
PH_DRIVER_INTERRUPT_RISINGEDGE | Interrupt on rising edge.
|
PH_DRIVER_INTERRUPT_FALLINGEDGE | Interrupt on falling edge.
|
PH_DRIVER_INTERRUPT_EITHEREDGE | Interrupt on either edge.
|
§ phDriver_Timer_Unit_t
Timer units.
Enumerator |
---|
PH_DRIVER_TIMER_SECS | Seconds timer.
|
PH_DRIVER_TIMER_MILLI_SECS | Milliseconds timer.
|
PH_DRIVER_TIMER_MICRO_SECS | Microseconds timer.
|
§ phDriver_PinConfig()
Configures the Gpio/Port pin for the specified configuration.
- Parameters
-
[in] | dwPinNumber | Gpio/Port pin number that needs to be configured. |
[in] | ePinFunc | Whether Gpio/Port Pin needs to be configured as Input/Output/Interrupt pin. |
[in] | pPinConfig | Pin configurations. |
- Returns
- Status of the API
- Return values
-
§ phDriver_PinRead()
Read the state of the Gpio pin, in case of interrupt pin it will return interrupt status.
- Parameters
-
[in] | dwPinNumber | Gpio/Port pin number to read. |
[in] | ePinFunc | Whether Gpio/Port Pin that needs to be read is Output or Interrupt pin. |
- Returns
- Status of the Gpio/Interrupt status either 1 or 0.
§ phDriver_PinWrite()
void phDriver_PinWrite |
( |
uint32_t |
dwPinNumber, |
|
|
uint8_t |
bValue |
|
) |
| |
Write to the Gpio/Port pin.
- Parameters
-
[in] | dwPinNumber | Gpio/Port pin number to write. |
[in] | bValue | Either 1 or 0 to write to Gpio/Port pin . |
- Returns
- Nothing
§ phDriver_PinClearIntStatus()
void phDriver_PinClearIntStatus |
( |
uint32_t |
dwPinNumber | ) |
|
Clear interrupt status.
- Parameters
-
[in] | dwPinNumber | Interrupt Pin number to clear interrupt status. |
- Returns
- Nothing
§ phDriver_TimerStart()
Creates and triggers a single shot Timer for the specified time.
- Parameters
-
[in] | eTimerUnit | Represents timer unit i.e. seconds, milliseconds or microseconds.. |
[in] | dwTimePeriod | Timer Timeout in units |
[in] | pTimerCallBack | Timer callback function in case of timeout. If pTimerCallBack is NULL then phDriver_TimerStart will be a blocking call and will return upon Timer Timeout. |
- Returns
- Status of the API
- Return values
-
§ phDriver_TimerStop()
Stops the running Timer.
- Returns
- Status of the API
- Return values
-