44 typedef enum _EPioType
49 #if (defined _SAM3S_) || (defined _SAM3S8_) || (defined _SAM3N_) 60 #define PIO_DEFAULT (0u << 0) 62 #define PIO_PULLUP (1u << 0) 64 #define PIO_DEGLITCH (1u << 1) 66 #define PIO_OPENDRAIN (1u << 2) 69 #define PIO_DEBOUNCE (1u << 3) 72 #define PIO_IT_AIME (1u << 4) 75 #define PIO_IT_RE_OR_HL (1u << 5) 77 #define PIO_IT_EDGE (1u << 6) 80 #define PIO_IT_LOW_LEVEL (0 | 0 | PIO_IT_AIME) 82 #define PIO_IT_HIGH_LEVEL (PIO_IT_RE_OR_HL | 0 | PIO_IT_AIME) 84 #define PIO_IT_FALL_EDGE (0 | PIO_IT_EDGE | PIO_IT_AIME) 86 #define PIO_IT_RISE_EDGE (PIO_IT_RE_OR_HL | PIO_IT_EDGE | PIO_IT_AIME) 110 extern void PIO_PullUp(
Pio* pPio,
const uint32_t dwMask,
const uint32_t dwPullUpEnable ) ;
113 extern void PIO_Set(
Pio* pPio,
const uint32_t dwMask ) ;
114 extern void PIO_Clear(
Pio* pPio,
const uint32_t dwMask ) ;
115 extern uint32_t
PIO_Get(
Pio* pPio,
const EPioType dwType,
const uint32_t dwMask ) ;
118 extern void PIO_SetInput(
Pio* pPio, uint32_t dwMask, uint32_t dwAttribute ) ;
119 extern void PIO_SetOutput(
Pio* pPio, uint32_t dwMask, uint32_t dwDefaultValue,
120 uint32_t dwMultiDriveEnable, uint32_t dwPullUpEnable ) ;
122 extern uint32_t
PIO_Configure(
Pio* pPio,
const EPioType dwType,
const uint32_t dwMask,
const uint32_t dwAttribute ) ;
void PIO_SetOutput(Pio *pPio, uint32_t dwMask, uint32_t dwDefaultValue, uint32_t dwMultiDriveEnable, uint32_t dwPullUpEnable)
Configures one or more pin(s) of a PIO controller as outputs, with the given default value...
Definition: pio.c:290
void PIO_SetInput(Pio *pPio, uint32_t dwMask, uint32_t dwAttribute)
Configures one or more pin(s) or a PIO controller as inputs. Optionally, the corresponding internal p...
Definition: pio.c:230
Pio hardware registers.
Definition: component_pio.h:41
void PIO_SetPeripheral(Pio *pPio, EPioType dwType, uint32_t dwMask)
Configures one pin of a PIO controller as being controlled by specific peripheral.
Definition: pio.c:153
uint32_t PIO_Get(Pio *pPio, const EPioType dwType, const uint32_t dwMask)
Returns 1 if one or more PIO of the given Pin instance currently have a high level; otherwise returns...
Definition: pio.c:111
uint32_t PIO_GetOutputDataStatus(const Pio *pPio, const uint32_t dwMask)
Returns 1 if one or more PIO of the given Pin are configured to output a high level (even if they are...
Definition: pio.c:372
uint32_t PIO_Configure(Pio *pPio, const EPioType dwType, const uint32_t dwMask, const uint32_t dwAttribute)
Definition: pio.c:325
void PIO_PullUp(Pio *pPio, const uint32_t dwMask, const uint32_t dwPullUpEnable)
Configures Pio pin internal pull-up.
Definition: pio.c:57
void PIO_SetDebounceFilter(Pio *pPio, const uint32_t dwMask, const uint32_t dwCuttOff)
Configures Glitch or Debouncing filter for input.
Definition: pio.c:76
void PIO_Clear(Pio *pPio, const uint32_t dwMask)
Sets a low output level on all the PIOs defined in the given Pin instance. This has no immediate effe...
Definition: pio.c:141
void PIO_DisableInterrupt(Pio *pPio, const uint32_t dwMask)
Configures Pio pin internal pull-up.
Definition: pio.c:44
void PIO_Set(Pio *pPio, const uint32_t dwMask)
Sets a high output level on all the PIOs defined in the given Pin instance. This has no immediate eff...
Definition: pio.c:95