|
SAM4SD32 (SAM4S-EK2)
|
Topics | |
| Legacy PIO group alias | |
Macros | |
| #define | FREQ_SLOW_CLOCK_EXT 32768 |
Functions | |
| void | pio_capture_disable (Pio *p_pio) |
| Disable PIO capture mode. | |
| void | pio_capture_disable_interrupt (Pio *p_pio, const uint32_t ul_mask) |
| Disable a given interrupt source of PIO capture. | |
| void | pio_capture_enable (Pio *p_pio) |
| Enable PIO capture mode. | |
| void | pio_capture_enable_interrupt (Pio *p_pio, const uint32_t ul_mask) |
| Enable the given interrupt source of PIO capture. | |
| uint32_t | pio_capture_get_interrupt_mask (const Pio *p_pio) |
| Read PIO interrupt mask of PIO capture. | |
| uint32_t | pio_capture_get_interrupt_status (const Pio *p_pio) |
| Read PIO interrupt status of PIO capture. | |
| Pdc * | pio_capture_get_pdc_base (const Pio *p_pio) |
| Get PDC registers base address. | |
| uint32_t | pio_capture_read (const Pio *p_pio, uint32_t *pul_data) |
| Read from Capture Reception Holding Register. | |
| void | pio_capture_set_mode (Pio *p_pio, uint32_t ul_mode) |
| Configure PIO capture mode. | |
| void | pio_clear (Pio *p_pio, const uint32_t ul_mask) |
| Set a low output level on all the PIOs defined in ul_mask. | |
| uint32_t | pio_configure (Pio *p_pio, const pio_type_t ul_type, const uint32_t ul_mask, const uint32_t ul_attribute) |
| Perform complete pin(s) configuration; general attributes and PIO init if necessary. | |
| void | pio_configure_interrupt (Pio *p_pio, const uint32_t ul_mask, const uint32_t ul_attr) |
| Configure the given interrupt source. | |
| uint32_t | pio_configure_pin (uint32_t ul_pin, const uint32_t ul_flags) |
| Perform complete pin(s) configuration; general attributes and PIO init if necessary. | |
| uint32_t | pio_configure_pin_group (Pio *p_pio, uint32_t ul_mask, const uint32_t ul_flags) |
| Perform complete pin(s) configuration; general attributes and PIO init if necessary. | |
| void | pio_disable_interrupt (Pio *p_pio, const uint32_t ul_mask) |
| Disable a given interrupt source, with no added side effects. | |
| void | pio_disable_output_write (Pio *p_pio, const uint32_t ul_mask) |
| Disable PIO output write. | |
| void | pio_disable_pin_interrupt (uint32_t ul_pin) |
| Disable interrupt for a GPIO pin. | |
| void | pio_enable_interrupt (Pio *p_pio, const uint32_t ul_mask) |
| Enable the given interrupt source. | |
| void | pio_enable_output_write (Pio *p_pio, const uint32_t ul_mask) |
| Enable PIO output write for synchronous data output. | |
| void | pio_enable_pin_interrupt (uint32_t ul_pin) |
| Enable interrupt for a GPIO pin. | |
| uint32_t | pio_get (Pio *p_pio, const pio_type_t ul_type, const uint32_t ul_mask) |
| Return 1 if one or more PIOs of the given Pin instance currently have a high level; otherwise returns 0. | |
| uint32_t | pio_get_interrupt_mask (const Pio *p_pio) |
| Read PIO interrupt mask. | |
| uint32_t | pio_get_interrupt_status (const Pio *p_pio) |
| Read and clear PIO interrupt status. | |
| uint32_t | pio_get_multi_driver_status (const Pio *p_pio) |
| Get multi-driver status. | |
| uint32_t | pio_get_output_data_status (const Pio *p_pio, const uint32_t ul_mask) |
| Return 1 if one or more PIOs of the given Pin are configured to output a high level (even if they are not output). | |
| uint32_t | pio_get_output_write_status (const Pio *p_pio) |
| Read PIO output write status. | |
| Pio * | pio_get_pin_group (uint32_t ul_pin) |
| Return GPIO port for a GPIO pin. | |
| uint32_t | pio_get_pin_group_id (uint32_t ul_pin) |
| Return GPIO port peripheral ID for a GPIO pin. | |
| uint32_t | pio_get_pin_group_mask (uint32_t ul_pin) |
| Return GPIO port pin mask for a GPIO pin. | |
| uint32_t | pio_get_pin_value (uint32_t ul_pin) |
| Return the value of a pin. | |
| uint32_t | pio_get_schmitt_trigger (const Pio *p_pio) |
| Get PIO pin schmitt trigger status. | |
| uint32_t | pio_get_writeprotect_status (const Pio *p_pio) |
| Read write protect status. | |
| void | pio_pull_down (Pio *p_pio, const uint32_t ul_mask, const uint32_t ul_pull_down_enable) |
| Configure PIO pin internal pull-down. | |
| void | pio_pull_up (Pio *p_pio, const uint32_t ul_mask, const uint32_t ul_pull_up_enable) |
| Configure PIO internal pull-up. | |
| void | pio_set (Pio *p_pio, const uint32_t ul_mask) |
| Set a high output level on all the PIOs defined in ul_mask. | |
| void | pio_set_additional_interrupt_mode (Pio *p_pio, const uint32_t ul_mask, const uint32_t ul_attribute) |
| Set additional interrupt mode. | |
| void | pio_set_debounce_filter (Pio *p_pio, const uint32_t ul_mask, const uint32_t ul_cut_off) |
| Configure Glitch or Debouncing filter for the specified input(s). | |
| void | pio_set_input (Pio *p_pio, const uint32_t ul_mask, const uint32_t ul_attribute) |
| Configure one or more pin(s) or a PIO controller as inputs. | |
| void | pio_set_multi_driver (Pio *p_pio, const uint32_t ul_mask, const uint32_t ul_multi_driver_enable) |
| Configure PIO pin multi-driver. | |
| void | pio_set_output (Pio *p_pio, const uint32_t ul_mask, const uint32_t ul_default_level, const uint32_t ul_multidrive_enable, const uint32_t ul_pull_up_enable) |
| Configure one or more pin(s) of a PIO controller as outputs, with the given default value. | |
| void | pio_set_peripheral (Pio *p_pio, const pio_type_t ul_type, const uint32_t ul_mask) |
| Configure IO of a PIO controller as being controlled by a specific peripheral. | |
| void | pio_set_pin_group_high (Pio *p_pio, uint32_t ul_mask) |
| Drive a GPIO port to 1. | |
| void | pio_set_pin_group_low (Pio *p_pio, uint32_t ul_mask) |
| Drive a GPIO port to 0. | |
| void | pio_set_pin_high (uint32_t ul_pin) |
| Drive a GPIO pin to 1. | |
| void | pio_set_pin_low (uint32_t ul_pin) |
| Drive a GPIO pin to 0. | |
| void | pio_set_schmitt_trigger (Pio *p_pio, const uint32_t ul_mask) |
| Configure PIO pin schmitt trigger. | |
| void | pio_set_writeprotect (Pio *p_pio, const uint32_t ul_enable) |
| Enable or disable write protect of PIO registers. | |
| void | pio_sync_output_write (Pio *p_pio, const uint32_t ul_mask) |
| Synchronously write on output pins. | |
| void | pio_toggle_pin (uint32_t ul_pin) |
| Toggle a GPIO pin. | |
| void | pio_toggle_pin_group (Pio *p_pio, uint32_t ul_mask) |
| Toggle a GPIO group. | |
Variables | |
| uint32_t | pio_capture_enable_flag |
The Parallel Input/Output Controller (PIO) manages up to 32 fully programmable input/output lines. Each I/O line may be dedicated as a general-purpose I/O or be assigned to a function of an embedded peripheral. This assures effective optimization of the pins of a product.
| #define FREQ_SLOW_CLOCK_EXT 32768 |
Definition at line 58 of file pio.c.
Referenced by pio_set_debounce_filter().
| void pio_capture_disable | ( | Pio * | p_pio | ) |
Disable PIO capture mode.
| p_pio | Pointer to a PIO instance. |
Definition at line 1064 of file pio.c.
References pio_capture_enable_flag, Pio::PIO_PCMR, and PIO_PCMR_PCEN.
| void pio_capture_disable_interrupt | ( | Pio * | p_pio, |
| const uint32_t | ul_mask ) |
Disable a given interrupt source of PIO capture.
| p_pio | Pointer to a PIO instance. |
| ul_mask | Interrupt sources bit map. |
Definition at line 1112 of file pio.c.
References Pio::PIO_PCIDR.
| void pio_capture_enable | ( | Pio * | p_pio | ) |
Enable PIO capture mode.
| p_pio | Pointer to a PIO instance. |
Definition at line 1053 of file pio.c.
References pio_capture_enable_flag, Pio::PIO_PCMR, and PIO_PCMR_PCEN.
| void pio_capture_enable_interrupt | ( | Pio * | p_pio, |
| const uint32_t | ul_mask ) |
Enable the given interrupt source of PIO capture.
The status register of the corresponding PIO capture controller is cleared prior to enabling the interrupt.
| p_pio | Pointer to a PIO instance. |
| ul_mask | Interrupt sources bit map. |
Definition at line 1100 of file pio.c.
References Pio::PIO_PCIER, and Pio::PIO_PCISR.
| uint32_t pio_capture_get_interrupt_mask | ( | const Pio * | p_pio | ) |
Read PIO interrupt mask of PIO capture.
| p_pio | Pointer to a PIO instance. |
Definition at line 1136 of file pio.c.
References Pio::PIO_PCIMR.
| uint32_t pio_capture_get_interrupt_status | ( | const Pio * | p_pio | ) |
Read PIO interrupt status of PIO capture.
| p_pio | Pointer to a PIO instance. |
Definition at line 1124 of file pio.c.
References Pio::PIO_PCISR.
| Pdc * pio_capture_get_pdc_base | ( | const Pio * | p_pio | ) |
| uint32_t pio_capture_read | ( | const Pio * | p_pio, |
| uint32_t * | pul_data ) |
Read from Capture Reception Holding Register.
| p_pio | Pointer to a PIO instance. |
| pul_data | Pointer to store the data. |
| 0 | Success. |
| 1 | I/O Failure, Capture data is not ready. |
Definition at line 1080 of file pio.c.
References Pio::PIO_PCISR, PIO_PCISR_DRDY, and Pio::PIO_PCRHR.
| void pio_capture_set_mode | ( | Pio * | p_pio, |
| uint32_t | ul_mode ) |
Configure PIO capture mode.
| p_pio | Pointer to a PIO instance. |
| ul_mode | Bitmask of one or more modes. |
Definition at line 1042 of file pio.c.
References Pio::PIO_PCMR, and PIO_PCMR_PCEN.
| void pio_clear | ( | Pio * | p_pio, |
| const uint32_t | ul_mask ) |
Set a low output level on all the PIOs defined in ul_mask.
This has no immediate effects on PIOs that are not output, but the PIO controller will save the value if they are changed to outputs.
| p_pio | Pointer to a PIO instance. |
| ul_mask | Bitmask of one or more pin(s) to configure. |
Definition at line 130 of file pio.c.
References Pio::PIO_CODR.
| uint32_t pio_configure | ( | Pio * | p_pio, |
| const pio_type_t | ul_type, | ||
| const uint32_t | ul_mask, | ||
| const uint32_t | ul_attribute ) |
Perform complete pin(s) configuration; general attributes and PIO init if necessary.
| p_pio | Pointer to a PIO instance. |
| ul_type | PIO type. |
| ul_mask | Bitmask of one or more pin(s) to configure. |
| ul_attribute | Pins attributes. |
Definition at line 348 of file pio.c.
References PIO_INPUT, PIO_OPENDRAIN, PIO_OUTPUT_0, PIO_OUTPUT_1, PIO_PERIPH_A, PIO_PERIPH_B, PIO_PERIPH_C, PIO_PERIPH_D, pio_pull_up(), PIO_PULLUP, pio_set_input(), pio_set_output(), and pio_set_peripheral().
| void pio_configure_interrupt | ( | Pio * | p_pio, |
| const uint32_t | ul_mask, | ||
| const uint32_t | ul_attr ) |
Configure the given interrupt source.
Interrupt can be configured to trigger on rising edge, falling edge, high level, low level or simply on level change.
| p_pio | Pointer to a PIO instance. |
| ul_mask | Interrupt source bit map. |
| ul_attr | Interrupt source attributes. |
Definition at line 538 of file pio.c.
References Pio::PIO_AIMDR, Pio::PIO_AIMER, Pio::PIO_ESR, Pio::PIO_FELLSR, PIO_IT_AIME, PIO_IT_EDGE, PIO_IT_RE_OR_HL, Pio::PIO_LSR, and Pio::PIO_REHLSR.
Referenced by pio_handler_set().
| uint32_t pio_configure_pin | ( | uint32_t | ul_pin, |
| const uint32_t | ul_flags ) |
Perform complete pin(s) configuration; general attributes and PIO init if necessary.
| ul_pin | The pin index. |
| ul_flags | Pins attributes. |
Definition at line 763 of file pio.c.
References pio_get_pin_group(), PIO_OPENDRAIN, PIO_PERIPH_A, PIO_PERIPH_B, PIO_PERIPH_C, PIO_PERIPH_D, pio_pull_up(), PIO_PULLUP, pio_set_input(), pio_set_output(), pio_set_peripheral(), PIO_TYPE_Msk, PIO_TYPE_PIO_INPUT, PIO_TYPE_PIO_OUTPUT_0, PIO_TYPE_PIO_OUTPUT_1, PIO_TYPE_PIO_PERIPH_A, PIO_TYPE_PIO_PERIPH_B, PIO_TYPE_PIO_PERIPH_C, and PIO_TYPE_PIO_PERIPH_D.
| uint32_t pio_configure_pin_group | ( | Pio * | p_pio, |
| uint32_t | ul_mask, | ||
| const uint32_t | ul_flags ) |
Perform complete pin(s) configuration; general attributes and PIO init if necessary.
| p_pio | Pointer to a PIO instance. |
| ul_mask | Bitmask of one or more pin(s) to configure. |
| ul_flags | Pin(s) attributes. |
Definition at line 863 of file pio.c.
References PIO_OPENDRAIN, PIO_PERIPH_A, PIO_PERIPH_B, PIO_PERIPH_C, PIO_PERIPH_D, pio_pull_up(), PIO_PULLUP, pio_set_input(), pio_set_output(), pio_set_peripheral(), PIO_TYPE_Msk, PIO_TYPE_PIO_INPUT, PIO_TYPE_PIO_OUTPUT_0, PIO_TYPE_PIO_OUTPUT_1, PIO_TYPE_PIO_PERIPH_A, PIO_TYPE_PIO_PERIPH_B, PIO_TYPE_PIO_PERIPH_C, and PIO_TYPE_PIO_PERIPH_D.
| void pio_disable_interrupt | ( | Pio * | p_pio, |
| const uint32_t | ul_mask ) |
Disable a given interrupt source, with no added side effects.
| p_pio | Pointer to a PIO instance. |
| ul_mask | Interrupt sources bit map. |
Definition at line 589 of file pio.c.
References Pio::PIO_IDR.
Referenced by pio_handler_set_priority(), pio_set_input(), and pio_set_output().
| void pio_disable_output_write | ( | Pio * | p_pio, |
| const uint32_t | ul_mask ) |
Disable PIO output write.
| p_pio | Pointer to a PIO instance. |
| ul_mask | Bitmask of one or more pin(s) to configure. |
Definition at line 472 of file pio.c.
References Pio::PIO_OWDR.
| void pio_disable_pin_interrupt | ( | uint32_t | ul_pin | ) |
Disable interrupt for a GPIO pin.
| ul_pin | The pin index. |
Definition at line 929 of file pio.c.
References pio_get_pin_group(), and Pio::PIO_IDR.
| void pio_enable_interrupt | ( | Pio * | p_pio, |
| const uint32_t | ul_mask ) |
Enable the given interrupt source.
The PIO must be configured as an NVIC interrupt source as well.
| p_pio | Pointer to a PIO instance. |
| ul_mask | Interrupt sources bit map. |
Definition at line 578 of file pio.c.
References Pio::PIO_IER.
Referenced by pio_handler_set_priority().
| void pio_enable_output_write | ( | Pio * | p_pio, |
| const uint32_t | ul_mask ) |
Enable PIO output write for synchronous data output.
| p_pio | Pointer to a PIO instance. |
| ul_mask | Bitmask of one or more pin(s) to configure. |
Definition at line 461 of file pio.c.
References Pio::PIO_OWER.
| void pio_enable_pin_interrupt | ( | uint32_t | ul_pin | ) |
Enable interrupt for a GPIO pin.
| ul_pin | The pin index. |
Definition at line 914 of file pio.c.
References pio_get_pin_group(), and Pio::PIO_IER.
| uint32_t pio_get | ( | Pio * | p_pio, |
| const pio_type_t | ul_type, | ||
| const uint32_t | ul_mask ) |
Return 1 if one or more PIOs of the given Pin instance currently have a high level; otherwise returns 0.
This method returns the actual value that is being read on the pin. To return the supposed output value of a pin, use pio_get_output_data_status() instead.
| p_pio | Pointer to a PIO instance. |
| ul_type | PIO type. |
| ul_mask | Bitmask of one or more pin(s) to configure. |
| 1 | at least one PIO currently has a high level. |
| 0 | all PIOs have a low level. |
Definition at line 148 of file pio.c.
References Pio::PIO_ODSR, PIO_OUTPUT_0, PIO_OUTPUT_1, and Pio::PIO_PDSR.
| uint32_t pio_get_interrupt_mask | ( | const Pio * | p_pio | ) |
Read PIO interrupt mask.
| p_pio | Pointer to a PIO instance. |
Definition at line 613 of file pio.c.
References Pio::PIO_IMR.
Referenced by pio_handler_process(), and pio_handler_set_priority().
| uint32_t pio_get_interrupt_status | ( | const Pio * | p_pio | ) |
Read and clear PIO interrupt status.
| p_pio | Pointer to a PIO instance. |
Definition at line 601 of file pio.c.
References Pio::PIO_ISR.
Referenced by pio_handler_process(), and pio_handler_set_priority().
| uint32_t pio_get_multi_driver_status | ( | const Pio * | p_pio | ) |
Get multi-driver status.
| p_pio | Pointer to a PIO instance. |
Definition at line 428 of file pio.c.
References Pio::PIO_MDSR.
| uint32_t pio_get_output_data_status | ( | const Pio * | p_pio, |
| const uint32_t | ul_mask ) |
Return 1 if one or more PIOs of the given Pin are configured to output a high level (even if they are not output).
To get the actual value of the pin, use PIO_Get() instead.
| p_pio | Pointer to a PIO instance. |
| ul_mask | Bitmask of one or more pin(s). |
| 1 | At least one PIO is configured to output a high level. |
| 0 | All PIOs are configured to output a low level. |
Definition at line 392 of file pio.c.
References Pio::PIO_ODSR.
| uint32_t pio_get_output_write_status | ( | const Pio * | p_pio | ) |
Read PIO output write status.
| p_pio | Pointer to a PIO instance. |
Definition at line 484 of file pio.c.
References Pio::PIO_OWSR.
| Pio * pio_get_pin_group | ( | uint32_t | ul_pin | ) |
Return GPIO port for a GPIO pin.
| ul_pin | The pin index. |
Definition at line 944 of file pio.c.
References PIO_DELTA, PIO_PC9_IDX, PIOA, and PIOC.
Referenced by pio_configure_pin(), pio_disable_pin_interrupt(), pio_enable_pin_interrupt(), pio_get_pin_value(), pio_set_pin_high(), pio_set_pin_low(), and pio_toggle_pin().
| uint32_t pio_get_pin_group_id | ( | uint32_t | ul_pin | ) |
Return GPIO port peripheral ID for a GPIO pin.
| ul_pin | The pin index. |
Definition at line 979 of file pio.c.
References ID_PIOA, ID_PIOC, and PIO_PC9_IDX.
| uint32_t pio_get_pin_group_mask | ( | uint32_t | ul_pin | ) |
| uint32_t pio_get_pin_value | ( | uint32_t | ul_pin | ) |
Return the value of a pin.
| ul_pin | The pin number. |
Definition at line 697 of file pio.c.
References pio_get_pin_group(), and Pio::PIO_PDSR.
| uint32_t pio_get_schmitt_trigger | ( | const Pio * | p_pio | ) |
Get PIO pin schmitt trigger status.
| p_pio | Pointer to a PIO instance. |
Definition at line 523 of file pio.c.
References Pio::PIO_SCHMITT.
| uint32_t pio_get_writeprotect_status | ( | const Pio * | p_pio | ) |
Read write protect status.
| p_pio | Pointer to a PIO instance. |
Definition at line 679 of file pio.c.
References Pio::PIO_WPSR.
| void pio_pull_down | ( | Pio * | p_pio, |
| const uint32_t | ul_mask, | ||
| const uint32_t | ul_pull_down_enable ) |
Configure PIO pin internal pull-down.
| p_pio | Pointer to a PIO instance. |
| ul_mask | Bitmask of one or more pin(s) to configure. |
| ul_pull_down_enable | Indicates if the pin(s) internal pull-down shall be configured. |
Definition at line 443 of file pio.c.
References Pio::PIO_PPDDR, and Pio::PIO_PPDER.
| void pio_pull_up | ( | Pio * | p_pio, |
| const uint32_t | ul_mask, | ||
| const uint32_t | ul_pull_up_enable ) |
Configure PIO internal pull-up.
| p_pio | Pointer to a PIO instance. |
| ul_mask | Bitmask of one or more pin(s) to configure. |
| ul_pull_up_enable | Indicates if the pin(s) internal pull-up shall be configured. |
Definition at line 69 of file pio.c.
References Pio::PIO_PUDR, and Pio::PIO_PUER.
Referenced by pio_configure(), pio_configure_pin(), pio_configure_pin_group(), pio_set_input(), and pio_set_output().
| void pio_set | ( | Pio * | p_pio, |
| const uint32_t | ul_mask ) |
Set a high output level on all the PIOs defined in ul_mask.
This has no immediate effects on PIOs that are not output, but the PIO controller will save the value if they are changed to outputs.
| p_pio | Pointer to a PIO instance. |
| ul_mask | Bitmask of one or more pin(s) to configure. |
Definition at line 117 of file pio.c.
References Pio::PIO_SODR.
| void pio_set_additional_interrupt_mode | ( | Pio * | p_pio, |
| const uint32_t | ul_mask, | ||
| const uint32_t | ul_attribute ) |
Set additional interrupt mode.
| p_pio | Pointer to a PIO instance. |
| ul_mask | Interrupt sources bit map. |
| ul_attribute | Pin(s) attributes. |
Definition at line 625 of file pio.c.
References Pio::PIO_AIMDR, Pio::PIO_AIMER, Pio::PIO_ESR, Pio::PIO_FELLSR, PIO_IT_AIME, PIO_IT_EDGE, PIO_IT_RE_OR_HL, Pio::PIO_LSR, and Pio::PIO_REHLSR.
| void pio_set_debounce_filter | ( | Pio * | p_pio, |
| const uint32_t | ul_mask, | ||
| const uint32_t | ul_cut_off ) |
Configure Glitch or Debouncing filter for the specified input(s).
| p_pio | Pointer to a PIO instance. |
| ul_mask | Bitmask of one or more pin(s) to configure. |
| ul_cut_off | Cuts off frequency for debouncing filter. |
Definition at line 87 of file pio.c.
References FREQ_SLOW_CLOCK_EXT, Pio::PIO_IFSCER, Pio::PIO_SCDR, and PIO_SCDR_DIV.
| void pio_set_input | ( | Pio * | p_pio, |
| const uint32_t | ul_mask, | ||
| const uint32_t | ul_attribute ) |
Configure one or more pin(s) or a PIO controller as inputs.
Optionally, the corresponding internal pull-up(s) and glitch filter(s) can be enabled.
| p_pio | Pointer to a PIO instance. |
| ul_mask | Bitmask indicating which pin(s) to configure as input(s). |
| ul_attribute | PIO attribute(s). |
Definition at line 257 of file pio.c.
References PIO_DEBOUNCE, PIO_DEGLITCH, pio_disable_interrupt(), Pio::PIO_IFDR, Pio::PIO_IFER, Pio::PIO_IFSCDR, Pio::PIO_IFSCER, Pio::PIO_ODR, Pio::PIO_PER, pio_pull_up(), and PIO_PULLUP.
Referenced by pio_configure(), pio_configure_pin(), and pio_configure_pin_group().
| void pio_set_multi_driver | ( | Pio * | p_pio, |
| const uint32_t | ul_mask, | ||
| const uint32_t | ul_multi_driver_enable ) |
Configure PIO pin multi-driver.
| p_pio | Pointer to a PIO instance. |
| ul_mask | Bitmask of one or more pin(s) to configure. |
| ul_multi_driver_enable | Indicates if the pin(s) multi-driver shall be configured. |
Definition at line 410 of file pio.c.
References Pio::PIO_MDDR, and Pio::PIO_MDER.
| void pio_set_output | ( | Pio * | p_pio, |
| const uint32_t | ul_mask, | ||
| const uint32_t | ul_default_level, | ||
| const uint32_t | ul_multidrive_enable, | ||
| const uint32_t | ul_pull_up_enable ) |
Configure one or more pin(s) of a PIO controller as outputs, with the given default value.
Optionally, the multi-drive feature can be enabled on the pin(s).
| p_pio | Pointer to a PIO instance. |
| ul_mask | Bitmask indicating which pin(s) to configure. |
| ul_default_level | Default level on the pin(s). |
| ul_multidrive_enable | Indicates if the pin(s) shall be configured as open-drain. |
| ul_pull_up_enable | Indicates if the pin shall have its pull-up activated. |
Definition at line 310 of file pio.c.
References Pio::PIO_CODR, pio_disable_interrupt(), Pio::PIO_MDDR, Pio::PIO_MDER, Pio::PIO_OER, Pio::PIO_PER, pio_pull_up(), and Pio::PIO_SODR.
Referenced by pio_configure(), pio_configure_pin(), and pio_configure_pin_group().
| void pio_set_peripheral | ( | Pio * | p_pio, |
| const pio_type_t | ul_type, | ||
| const uint32_t | ul_mask ) |
Configure IO of a PIO controller as being controlled by a specific peripheral.
| p_pio | Pointer to a PIO instance. |
| ul_type | PIO type. |
| ul_mask | Bitmask of one or more pin(s) to configure. |
Definition at line 174 of file pio.c.
References Pio::PIO_ABCDSR, Pio::PIO_IDR, PIO_INPUT, PIO_NOT_A_PIN, PIO_OUTPUT_0, PIO_OUTPUT_1, Pio::PIO_PDR, PIO_PERIPH_A, PIO_PERIPH_B, PIO_PERIPH_C, and PIO_PERIPH_D.
Referenced by pio_configure(), pio_configure_pin(), and pio_configure_pin_group().
| void pio_set_pin_group_high | ( | Pio * | p_pio, |
| uint32_t | ul_mask ) |
Drive a GPIO port to 1.
| p_pio | Base address of the PIO port. |
| ul_mask | Bitmask of one or more pin(s) to toggle. |
Definition at line 818 of file pio.c.
References Pio::PIO_SODR.
| void pio_set_pin_group_low | ( | Pio * | p_pio, |
| uint32_t | ul_mask ) |
Drive a GPIO port to 0.
| p_pio | Base address of the PIO port. |
| ul_mask | Bitmask of one or more pin(s) to toggle. |
Definition at line 830 of file pio.c.
References Pio::PIO_CODR.
| void pio_set_pin_high | ( | uint32_t | ul_pin | ) |
Drive a GPIO pin to 1.
| ul_pin | The pin index. |
Definition at line 711 of file pio.c.
References pio_get_pin_group(), and Pio::PIO_SODR.
| void pio_set_pin_low | ( | uint32_t | ul_pin | ) |
Drive a GPIO pin to 0.
| ul_pin | The pin index. |
Definition at line 726 of file pio.c.
References Pio::PIO_CODR, and pio_get_pin_group().
| void pio_set_schmitt_trigger | ( | Pio * | p_pio, |
| const uint32_t | ul_mask ) |
Configure PIO pin schmitt trigger.
By default the Schmitt trigger is active. Disabling the Schmitt Trigger is requested when using the QTouch Library.
| p_pio | Pointer to a PIO instance. |
| ul_mask | Bitmask of one or more pin(s) to configure. |
Definition at line 511 of file pio.c.
References Pio::PIO_SCHMITT.
| void pio_set_writeprotect | ( | Pio * | p_pio, |
| const uint32_t | ul_enable ) |
Enable or disable write protect of PIO registers.
| p_pio | Pointer to a PIO instance. |
| ul_enable | 1 to enable, 0 to disable. |
Definition at line 667 of file pio.c.
References Pio::PIO_WPMR, PIO_WPMR_WPEN, and PIO_WPMR_WPKEY_PASSWD.
| void pio_sync_output_write | ( | Pio * | p_pio, |
| const uint32_t | ul_mask ) |
Synchronously write on output pins.
| p_pio | Pointer to a PIO instance. |
| ul_mask | Bitmask of one or more pin(s) to configure. |
Definition at line 497 of file pio.c.
References Pio::PIO_ODSR.
| void pio_toggle_pin | ( | uint32_t | ul_pin | ) |
Toggle a GPIO pin.
| ul_pin | The pin index. |
Definition at line 741 of file pio.c.
References Pio::PIO_CODR, pio_get_pin_group(), Pio::PIO_ODSR, and Pio::PIO_SODR.
| void pio_toggle_pin_group | ( | Pio * | p_pio, |
| uint32_t | ul_mask ) |
Toggle a GPIO group.
| p_pio | Pointer to a PIO instance. |
| ul_mask | Bitmask of one or more pin(s) to configure. |
Definition at line 842 of file pio.c.
References Pio::PIO_CODR, Pio::PIO_ODSR, and Pio::PIO_SODR.
| uint32_t pio_capture_enable_flag |
Definition at line 1033 of file pio.c.
Referenced by pio_capture_disable(), pio_capture_enable(), and pio_handler_process().