mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-21 02:06:14 +08:00
@@ -25,6 +25,8 @@ struct rt_device_pin
|
||||
const struct rt_pin_ops *ops;
|
||||
};
|
||||
|
||||
#define PIN_NONE (-1)
|
||||
|
||||
#define PIN_LOW 0x00
|
||||
#define PIN_HIGH 0x01
|
||||
|
||||
@@ -43,7 +45,7 @@ struct rt_device_pin
|
||||
#define PIN_IRQ_DISABLE 0x00
|
||||
#define PIN_IRQ_ENABLE 0x01
|
||||
|
||||
#define PIN_IRQ_PIN_NONE -1
|
||||
#define PIN_IRQ_PIN_NONE PIN_NONE
|
||||
|
||||
struct rt_device_pin_mode
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <rtthread.h>
|
||||
#include <rtdevice.h>
|
||||
#include <drivers/pin.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
@@ -79,7 +79,6 @@ struct rt_spi_configuration
|
||||
rt_uint8_t mode;
|
||||
rt_uint8_t data_width;
|
||||
rt_uint16_t reserved;
|
||||
rt_base_t cs_pin;
|
||||
|
||||
rt_uint32_t max_hz;
|
||||
};
|
||||
@@ -113,6 +112,7 @@ struct rt_spi_device
|
||||
struct rt_spi_bus *bus;
|
||||
|
||||
struct rt_spi_configuration config;
|
||||
rt_base_t cs_pin;
|
||||
void *user_data;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user