[−][src]Module dma_gpio::pi
Module for Board and BoardBuilder structs
Use BoardBuilder struct to initialize the Board struct, and use Board struct to manipulate GPIO Pins.
Structs
Board | Struct for dealing with GPIO Pins. |
BoardBuilder | Struct for initialzing Board and configuring the settings. |
Constants
DEFAULT_CYCLE_TIME | = 2000. Default period of the PWM signal. |
DEFAULT_NUM_CHANNELS | = 9. Default number of channels. |
DEFAULT_PWM_DIVISOR | = 500. Default value for pwm div. |
DEFAULT_SAMPLE_DELAY | = 10. Pulse width increment granularity. |
DELAY_VIA_PCM | Indicates using PCM |
DELAY_VIA_PWM | Indicates using PWM |
MAX_CHANNELS | = 32. The highest gpio we can address. |
NUM_CBS | = NUM_SAMPLES * 2 = 400. Number of Control Blocks. |
NUM_SAMPLES | = DEFAULT_CYCLE_TIME/DEFAULT_SAMPLE_DELAY = 200. Number of samples. |
Statics
BANNED_PINS | [6, 28, 29, 30, 31, 40, 45, 46, 47, 48, 49, 50, 51, 52, 53]. List of reserved GPIO pins |
DEFAULT_PINS | [4, 17, 18, 27, 21, 22, 23, 24, 25]. 9 default GPIO pins on pi. |
Functions
is_banned_pin | Check if the pin provided is found in the list of BANNED pins. |
udelay | delay for # us seconds. |