something_i_am_sure
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
#if __has_include(<linux/types.h>)
|
||||
#include <linux/types.h>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
typedef uint8_t u8;
|
||||
#endif
|
||||
enum op_type {
|
||||
OP_CAPABILITIES_GET,
|
||||
OP_GPIO_GET,
|
||||
OP_GPIO_SET,
|
||||
OP_GPIO_SET_DIR,
|
||||
OP_SET_ADC_PIN,
|
||||
OP_READ_ADC,
|
||||
OP_GPIO_SET_BAUD,
|
||||
OP_GPIO_WRITE_UART,
|
||||
OP_GPIO_READ_UART,
|
||||
OP_GPIO_SET_CLK,
|
||||
OP_GPIO_WRITE_SPI,
|
||||
OP_GPIO_READ_SPI
|
||||
};
|
||||
enum direction { DIR_IN, DIR_OUT };
|
||||
|
||||
enum vendor_request {
|
||||
GET_INFO,
|
||||
CONTROL_PINS
|
||||
};
|
||||
|
||||
struct __attribute__((packed)) microcontroller_capabilities {
|
||||
u8 num_gpio;
|
||||
u8 num_uart;
|
||||
u8 num_spi;
|
||||
u8 num_adc;
|
||||
};
|
||||
Reference in New Issue
Block a user