![]() |
GaIA BIOS Library
|
Functions to handle IOBUS interfacing and handling. More...
Functions | |
| void | gwa_core_io_lib_speed (iobus_speed_t speed) |
| IOBUS SPI speed setup. | |
| int | gwa_core_io_lib_init (void) |
| Identifies hardware and initializes the core library. | |
| const spi_module_t ** | gwa_core_get_modules (void) |
| Gets the list of installed modules. | |
| void | gwa_core_io_scan (void) |
| Scans the io spi daisy chain. | |
| void | gwa_core_io_out_copy (void) |
| Copies output values to SPI buffers. | |
| void | gwa_core_io_in_copy (void) |
| Copies input values from SPI buffers. | |
| uint16_t | gwa_dip_read (void) |
| Gets the DIP switch value. | |
Functions to handle IOBUS interfacing and handling.
| const spi_module_t ** gwa_core_get_modules | ( | void | ) |
Gets the list of installed modules.
| int gwa_core_io_lib_init | ( | void | ) |
Identifies hardware and initializes the core library.
0 if everything was ok, an error code otherwise. | void gwa_core_io_lib_speed | ( | iobus_speed_t | speed | ) |
IOBUS SPI speed setup.
IOBUS SPI interface can operate at different clock rates, based on how many devices are connected on the IOBUS. The more devices, the slower must the IOBUS clock be, to compensate for SPI chain delays. By default, the IOBUS operates at the slowest speed; this function is called to select an higher clock speed.
| speed | - IOBUS speed setting. It can be one of: iobus_default_speed, iobus_full_speed, iobus_high_speed, iobus_warp_speed Default value is iobus_default_speed |
This function must be called BEFORE gwa_core_io_lib_init. Calling this function when the IOBUS is already initialized has no effect.
| void gwa_core_io_scan | ( | void | ) |
Scans the io spi daisy chain.
The length and composition of the chain depends on the hardware configuration.
| uint16_t gwa_dip_read | ( | void | ) |
Gets the DIP switch value.