u8x8_riotos.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 Petr Vyleta <vyleta.developer@gmail.com>
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
22 #ifndef U8X8_RIOTOS_H
23 #define U8X8_RIOTOS_H
24 
25 #include "u8x8.h"
26 
27 #include "periph/gpio.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
42 typedef struct {
43  void *user_ptr;
45  unsigned int device_index;
46  gpio_t pin_cs;
47  gpio_t pin_dc;
48  gpio_t pin_reset;
50 
54 uint8_t u8x8_gpio_and_delay_riotos(u8x8_t *u8g2, uint8_t msg, uint8_t arg_int, void *arg_ptr);
55 
59 uint8_t u8x8_byte_hw_spi_riotos(u8x8_t *u8g2, uint8_t msg, uint8_t arg_int, void *arg_ptr);
60 
64 uint8_t u8x8_byte_hw_i2c_riotos(u8x8_t *u8g2, uint8_t msg, uint8_t arg_int, void *arg_ptr);
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
70 #endif /* U8X8_RIOTOS_H */
u8x8_riotos_t::device_index
unsigned int device_index
Index of the SPI/I2C device.
Definition: u8x8_riotos.h:45
u8x8_byte_hw_spi_riotos
uint8_t u8x8_byte_hw_spi_riotos(u8x8_t *u8g2, uint8_t msg, uint8_t arg_int, void *arg_ptr)
To be used as the u8x8_msg_cb as gpio_and_delay_cb in u8x8_Setup() for use with RIOT-OS.
u8x8_byte_hw_i2c_riotos
uint8_t u8x8_byte_hw_i2c_riotos(u8x8_t *u8g2, uint8_t msg, uint8_t arg_int, void *arg_ptr)
To be used as the u8x8_msg_cb as gpio_and_delay_cb in u8x8_Setup() for use with RIOT-OS.
u8x8_riotos_t::pin_cs
gpio_t pin_cs
Pin for SPI CS, GPIO_UNDEF if not used.
Definition: u8x8_riotos.h:46
u8x8_riotos_t::pin_reset
gpio_t pin_reset
Pin for RESET, GPIO_UNDEF if not used.
Definition: u8x8_riotos.h:48
u8x8_riotos_t
Holds RIOT-OS specific peripheral data.
Definition: u8x8_riotos.h:42
u8x8_riotos_t::user_ptr
void * user_ptr
Pointer to optionally store any additional user-data.
Definition: u8x8_riotos.h:43
gpio.h
Low-level GPIO peripheral driver interface definitions.
u8x8_gpio_and_delay_riotos
uint8_t u8x8_gpio_and_delay_riotos(u8x8_t *u8g2, uint8_t msg, uint8_t arg_int, void *arg_ptr)
To be used as the u8x8_msg_cb as gpio_and_delay_cb in u8x8_Setup() for use with RIOT-OS.
u8x8_riotos_t::pin_dc
gpio_t pin_dc
Pin for SPI DC, GPIO_UNDEF if not used.
Definition: u8x8_riotos.h:47