Loading...
Searching...
No Matches
ucg_riotos.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020 Bas Stottelaar <basstottelaar@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 UCG_RIOTOS_H
23#define UCG_RIOTOS_H
24
25#include "ucg.h"
26
27#include "periph/gpio.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
42typedef struct {
43 void *user_ptr;
45 unsigned int device_index;
46 gpio_t pin_cs;
47 gpio_t pin_cd;
48 gpio_t pin_reset;
50
54int16_t ucg_com_hw_spi_riotos(ucg_t *ucg, int16_t msg, uint16_t arg, uint8_t *data);
55
59ucg_int_t ucg_dev_dummy_riotos(ucg_t *ucg, ucg_int_t msg, void *data);
60
61#ifdef __cplusplus
62}
63#endif
64
65#endif /* UCG_RIOTOS_H */
Low-level GPIO peripheral driver interface definitions.
Holds RIOT-OS specific peripheral data.
Definition ucg_riotos.h:42
gpio_t pin_cs
Pin for SPI CS, GPIO_UNDEF if not used.
Definition ucg_riotos.h:46
void * user_ptr
Pointer to optionally store any additional user-data.
Definition ucg_riotos.h:43
gpio_t pin_reset
Pin for RESET, GPIO_UNDEF if not used.
Definition ucg_riotos.h:48
gpio_t pin_cd
Pin for SPI CD, GPIO_UNDEF if not used.
Definition ucg_riotos.h:47
unsigned int device_index
Index of the SPI device.
Definition ucg_riotos.h:45
ucg_int_t ucg_dev_dummy_riotos(ucg_t *ucg, ucg_int_t msg, void *data)
To be used as the u8x8_msg_cb as gpio_and_delay_cb in u8x8_Setup() for use with RIOT-OS.
int16_t ucg_com_hw_spi_riotos(ucg_t *ucg, int16_t msg, uint16_t arg, uint8_t *data)
To be used as the u8x8_msg_cb as gpio_and_delay_cb in u8x8_Setup() for use with RIOT-OS.