Loading...
Searching...
No Matches
ucg_riotos.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2020 Bas Stottelaar <basstottelaar@gmail.com>
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
20
21#include "ucg.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_cd;
44 gpio_t pin_reset;
46
50int16_t ucg_com_hw_spi_riotos(ucg_t *ucg, int16_t msg, uint16_t arg, uint8_t *data);
51
55ucg_int_t ucg_dev_dummy_riotos(ucg_t *ucg, ucg_int_t msg, void *data);
56
57#ifdef __cplusplus
58}
59#endif
Low-level GPIO peripheral driver interface definitions.
Holds RIOT-OS specific peripheral data.
Definition ucg_riotos.h:38
gpio_t pin_cs
Pin for SPI CS, GPIO_UNDEF if not used.
Definition ucg_riotos.h:42
void * user_ptr
Pointer to optionally store any additional user-data.
Definition ucg_riotos.h:39
gpio_t pin_reset
Pin for RESET, GPIO_UNDEF if not used.
Definition ucg_riotos.h:44
gpio_t pin_cd
Pin for SPI CD, GPIO_UNDEF if not used.
Definition ucg_riotos.h:43
unsigned int device_index
Index of the SPI device.
Definition ucg_riotos.h:41
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.