|
libjoybus
Joybus implementation for 32-bit MCUs
|
Joybus backend for Silicon Labs EFM32/EFR32 MCUs using the Gecko SDK. More...
Data Structures | |
| struct | joybus_gecko_data |
| struct | joybus_gecko |
| A Gecko Joybus instance. More... | |
Macros | |
| #define | JOYBUS_GECKO(bus) |
| Macro to cast a generic Joybus instance to a Gecko Joybus instance. | |
| #define | CHIPS_PER_BIT 4 |
| #define | EDGES_PER_BYTE 16 |
Functions | |
| int | joybus_gecko_init (struct joybus_gecko *gecko_bus, GPIO_Port_TypeDef port, uint8_t pin, TIMER_TypeDef *rx_timer, USART_TypeDef *tx_usart) |
| Initialize a Gecko Joybus instance. | |
Joybus backend for Silicon Labs EFM32/EFR32 MCUs using the Gecko SDK.
The Gecko backend is made available by setting JOYBUS_BACKEND_GECKO=ON in your CMake configuration.
| #define JOYBUS_GECKO | ( | bus | ) |
Macro to cast a generic Joybus instance to a Gecko Joybus instance.
| int joybus_gecko_init | ( | struct joybus_gecko * | gecko_bus, |
| GPIO_Port_TypeDef | port, | ||
| uint8_t | pin, | ||
| TIMER_TypeDef * | rx_timer, | ||
| USART_TypeDef * | tx_usart ) |
Initialize a Gecko Joybus instance.
Note: Some peripherals cannot be used on certain ports, check the DBUS Routing Table in the reference manual for your MCU.
| gecko_bus | the Gecko Joybus instance to initialize |
| port | the GPIO port to use for the Joybus data line |
| pin | the GPIO pin to use for the Joybus data line |
| rx_timer | the TIMER peripheral to use for receiving data |
| tx_usart | the USART peripheral to use for transmitting data |