High-level PIO peripheral driver interface. More...
High-level PIO peripheral driver interface.
Definition in file pio.h.
#include <stdbool.h>
Go to the source code of this file.
Data Structures | |
struct | pio_program_t |
Struct that models a PIO program. More... | |
Macros | |
#define | PIO_DEV(x) (x) |
Default PIO device access macro. | |
#define | PIO_PROGRAM_NOT_LOADED (-1) |
Program location that states that the program has not been loaded into instruction memory. | |
Typedefs | |
typedef unsigned | pio_t |
PIO index type. | |
typedef int | pio_sm_t |
PIO state machine index type. | |
Functions | |
void | pio_init (pio_t pio) |
Initialize a PIO device. | |
void | pio_start_programs (void) |
Start automatically configured PIO programs. | |
pio_sm_t | pio_sm_lock (pio_t pio) |
Get exclusive access to one of the state machines of PIO pio . | |
void | pio_sm_unlock (pio_t pio, pio_sm_t sm) |
Release a previously locked state machine. | |
void | pio_sm_start (pio_t pio, pio_sm_t sm) |
Start a state machine and execute the previously loaded program. | |
void | pio_sm_stop (pio_t pio, pio_sm_t sm) |
Stop the execution of a program. | |
int | pio_alloc_program (pio_t pio, pio_program_t *prog) |
Allocate the required instruction memory to load the given PIO program into. | |
int | pio_alloc_program_sm_lock_any (pio_t *pio_ptr, pio_sm_t *sm_ptr, pio_program_t *program) |
Convenience function which performs the usual PIO program resource acquisition. | |
void | pio_free_program (pio_t pio, pio_program_t *prog) |
Release the allocated instruction memory occupied by prog . | |