Loading...
Searching...
No Matches
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
9#pragma once
10
23
24#include "u8x8.h"
25
26#include "periph/gpio.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
41typedef struct {
42 void *user_ptr;
43
44 unsigned int device_index;
45 gpio_t pin_cs;
46 gpio_t pin_dc;
47 gpio_t pin_reset;
49
53uint8_t u8x8_gpio_and_delay_riotos(u8x8_t *u8g2, uint8_t msg, uint8_t arg_int, void *arg_ptr);
54
58uint8_t u8x8_byte_hw_spi_riotos(u8x8_t *u8g2, uint8_t msg, uint8_t arg_int, void *arg_ptr);
59
63uint8_t u8x8_byte_hw_i2c_riotos(u8x8_t *u8g2, uint8_t msg, uint8_t arg_int, void *arg_ptr);
64
65#ifdef __cplusplus
66}
67#endif
Low-level GPIO peripheral driver interface definitions.
Holds RIOT-OS specific peripheral data.
Definition u8x8_riotos.h:41
gpio_t pin_dc
Pin for SPI DC, GPIO_UNDEF if not used.
Definition u8x8_riotos.h:46
void * user_ptr
Pointer to optionally store any additional user-data.
Definition u8x8_riotos.h:42
unsigned int device_index
Index of the SPI/I2C device.
Definition u8x8_riotos.h:44
gpio_t pin_cs
Pin for SPI CS, GPIO_UNDEF if not used.
Definition u8x8_riotos.h:45
gpio_t pin_reset
Pin for RESET, GPIO_UNDEF if not used.
Definition u8x8_riotos.h:47
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.