void | IO004_Init (void) |
#define | IO004_ReadPin(Handle) (((Handle.PortRegs->IN) >> Handle.PortPin) & 1U) |
#define | IO004_SetPin(Handle) ((Handle.PortRegs->OMR) |= (1U << Handle.PortPin)) |
#define | IO004_SetOutputValue(Handle, Value) (Handle.PortRegs->OMR |= Value ? (1U << Handle.PortPin):(0x10000UL << Handle.PortPin)) |
#define | IO004_ResetPin(Handle) ((Handle.PortRegs->OMR) |= (0x10000UL << Handle.PortPin)) |
#define | IO004_TogglePin(Handle) ((Handle.PortRegs->OMR) |= (0x10001UL << Handle.PortPin)) |
void | IO004_DisableOutputDriver (const IO004_HandleType *Handle, IO004_InputModeType Mode) |
void | IO004_EnableOutputDriver (const IO004_HandleType *Handle, IO004_OutputModeType Mode) |
#define IO004_ReadPin | ( | Handle | ) | (((Handle.PortRegs->IN) >> Handle.PortPin) & 1U) |
This macro reads value at portpin.
[in] | Handle | to Port Pin App Instance |
Reentrant: NO
Example:
#include <DAVE3.h> int main(void) { bool Value = 0; DAVE_Init(); // IO004_Init() is called within DAVE_Init() Value = IO004_ReadPin(IO004_Handle0); return 0; }
<<<DD_IO004_API_2>>>
#define IO004_ResetPin | ( | Handle | ) | ((Handle.PortRegs->OMR) |= (0x10000UL << Handle.PortPin)) |
This macro sets the chosen portpin to '0'.
[in] | Handle | to Port Pin App Instance |
Reentrant: NO
Example:
#include <DAVE3.h> int main(void) { DAVE_Init(); // IO004_Init() is called within DAVE_Init() IO004_ResetPin(IO004_Handle0); return 0; }
<<<DD_IO004_API_4>>>
#define IO004_SetOutputValue | ( | Handle, | |
Value | |||
) | (Handle.PortRegs->OMR |= Value ? (1U << Handle.PortPin):(0x10000UL << Handle.PortPin)) |
This macro sets the chosen portpin with the boolean value provided.
[in] | Handle | to Port Pin App Instance |
Reentrant: NO
Example:
#include <DAVE3.h> int main(void) { DAVE_Init(); // IO002_Init() is called within DAVE_Init() IO004_SetOutputValue(IO004_Handle0,1); return 0; }
#define IO004_SetPin | ( | Handle | ) | ((Handle.PortRegs->OMR) |= (1U << Handle.PortPin)) |
This macro sets the chosen portpin to '1'.
[in] | Handle | to Port Pin App Instance |
Reentrant: NO
Example:
#include <DAVE3.h> int main(void) { DAVE_Init(); // IO004_Init() is called within DAVE_Init() IO004_SetPin(IO004_Handle0); return 0; }
<<<DD_IO004_API_3>>>
#define IO004_TogglePin | ( | Handle | ) | ((Handle.PortRegs->OMR) |= (0x10001UL << Handle.PortPin)) |
This macro toggles the chosen portpin.
[in] | Handle | to Port Pin App Instance |
Reentrant: NO
Example:
#include <DAVE3.h> int main(void) { DAVE_Init(); // IO004_Init() is called within DAVE_Init() IO004_TogglePin(IO004_Handle0); return 0; }
<<<DD_IO004_API_6>>>
void IO004_DisableOutputDriver | ( | const IO004_HandleType * | Handle, |
IO004_InputModeType | Mode | ||
) |
The chosen portpin is configured as input. The following definitions for Mode are available:
IO004_TRISTATE (no pull device connected)
IO004_PULL_DOWN_DEVICE (pull-down device connected)
IO004_PULL_UP_DEVICE (pull-up device connected)
IO004_CONT_POLLING (Pn_OUTx continuously samples input value)
IO004_INV_TRISTATE (Inverted no pull device connected)
IO004_INV_PULL_DOWN_DEVICE (Inverted pull-down device connected)
IO004_INV_IO004_PULL_UP_DEVICE(Inverted pull-up device connected)
IO004_INV_CONT_POLLING (Pn_OUTx continuously samples input value)
[in] | Handle | to Port Pin App Instance |
[in] | Mode | Input selection(Pull-Down,Pull-Up,Inv-Pull-Down,Inv-Pull-Up) for chosen port pin |
Reentrant: NO
Example:
#include <DAVE3.h> int main(void) { DAVE_Init(); // IO004_Init() is called within DAVE_Init() IO004_DisableOutputDriver(&IO004_Handle0,IO004_PULL_UP_DEVICE); return 0; }
void IO004_EnableOutputDriver | ( | const IO004_HandleType * | Handle, |
IO004_OutputModeType | Mode | ||
) |
The chosen portpin is configured as output. The following definitions for Mode are available: IO004_PUSHPULL (push-pull mode) IO004_OPENDRAIN (open drain mode)
[in] | Handle | to Port Pin App Instance |
[in] | Mode | - Output Characteristic(Push-Pull,Open-Drain)for chosen port Pin |
Reentrant: NO
Example:
#include <DAVE3.h> int main(void) { DAVE_Init(); // IO004_Init() is called within DAVE_Init() IO004_EnableOutputDriver(&IO004_Handle0,IO004_OPENDRAIN); return 0; }
void IO004_Init | ( | void | ) |
Initializes all the App instances based on user configuration
Reentrant: NO
Example:
#include <DAVE3.h> int main(void) { DAVE_Init(); // IO004_Init() is called within DAVE_Init() return 0; }
Inclusion of header file