Loading...
Searching...
No Matches
u8x8_riotos.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2018 Petr Vyleta <vyleta.developer@gmail.com>
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
20
21#include "u8x8.h"
22
23#include "periph/gpio.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
38typedef struct {
39 void *user_ptr;
40
41 unsigned int device_index;
42 gpio_t pin_cs;
43 gpio_t pin_dc;
44 gpio_t pin_reset;
46
50uint8_t u8x8_gpio_and_delay_riotos(u8x8_t *u8g2, uint8_t msg, uint8_t arg_int, void *arg_ptr);
51
55uint8_t u8x8_byte_hw_spi_riotos(u8x8_t *u8g2, uint8_t msg, uint8_t arg_int, void *arg_ptr);
56
60uint8_t u8x8_byte_hw_i2c_riotos(u8x8_t *u8g2, uint8_t msg, uint8_t arg_int, void *arg_ptr);
61
62#ifdef __cplusplus
63}
64#endif
Low-level GPIO peripheral driver interface definitions.
Holds RIOT-OS specific peripheral data.
Definition u8x8_riotos.h:38
gpio_t pin_dc
Pin for SPI DC, GPIO_UNDEF if not used.
Definition u8x8_riotos.h:43
void * user_ptr
Pointer to optionally store any additional user-data.
Definition u8x8_riotos.h:39
unsigned int device_index
Index of the SPI/I2C device.
Definition u8x8_riotos.h:41
gpio_t pin_cs
Pin for SPI CS, GPIO_UNDEF if not used.
Definition u8x8_riotos.h:42
gpio_t pin_reset
Pin for RESET, GPIO_UNDEF if not used.
Definition u8x8_riotos.h:44
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.
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.
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.