fix pika_hal enum

This commit is contained in:
lyon 2022-11-21 17:04:23 +08:00
parent 2344903b89
commit e288c40a2c
2 changed files with 14 additions and 14 deletions

View File

@ -22,17 +22,17 @@ typedef enum {
} PIKA_HAL_IOCTL_CMD;
typedef enum {
_PIKA_HAL_GPIO_DIR_UNUSED = 0,
PIKA_HAL_GPIO_DIR_IN,
PIKA_HAL_GPIO_DIR_OUT,
_PIKA_HAL_GPIO_DIR_UNUSED = 0,
_PIKA_HAL_GPIO_DIR_MAX,
} PIKA_HAL_GPIO_DIR;
typedef enum {
_PIKA_HAL_GPIO_PULL_UNUSED = 0,
PIKA_HAL_GPIO_PULL_NONE,
PIKA_HAL_GPIO_PULL_UP,
PIKA_HAL_GPIO_PULL_DOWN,
_PIKA_HAL_GPIO_PULL_UNUSED = 0,
_PIKA_HAL_GPIO_PULL_MAX,
} PIKA_HAL_GPIO_PULL;
@ -48,41 +48,41 @@ typedef struct {
} pika_hal_I2C_config;
typedef enum {
_PIKA_HAL_SPI_LSB_OR_MSB_UNUSED = 0,
PIKA_HAL_SPI_LSB,
PIKA_HAL_SPI_MSB,
_PIKA_HAL_SPI_LSB_OR_MSB_UNUSED = 0,
_PIKA_HAL_SPI_LSB_OR_MSB_MAX,
} PIKA_HAL_SPI_LSB_OR_MSB;
typedef enum {
_PIKA_HAL_SPI_MASTER_OR_SLAVE_UNUSED = 0,
PIKA_HAL_SPI_MASTER,
PIKA_HAL_SPI_SLAVE,
_PIKA_HAL_SPI_MASTER_OR_SLAVE_UNUSED = 0,
_PIKA_HAL_SPI_MASTER_OR_SLAVE_MAX,
} PIKA_HAL_SPI_MASTER_OR_SLAVE;
typedef enum {
_PIKA_HAL_SPI_MODE_UNUSED = 0,
PIKA_HAL_SPI_MODE_0,
PIKA_HAL_SPI_MODE_1,
PIKA_HAL_SPI_MODE_2,
PIKA_HAL_SPI_MODE_3,
_PIKA_HAL_SPI_MODE_UNUSED = 0,
_PIKA_HAL_SPI_MODE_MAX,
} PIKA_HAL_SPI_MODE;
typedef enum {
_PIKA_HAL_SPI_DATA_UNUSED = 0,
PIKA_HAL_SPI_DATA_WIDTH_8BIT,
PIKA_HAL_SPI_DATA_WIDTH_16BIT,
_PIKA_HAL_SPI_DATA_UNUSED = 0,
_PIKA_HAL_SPI_DATA_WIDTH_MAX,
} PIKA_HAL_SPI_DATA_WIDTH;
typedef enum {
_PIKA_HAL_SPI_SPEED_UNUSED = 0,
PIKA_HAL_SPI_SPEED_LOW,
PIKA_HAL_SPI_SPEED_MEDIUM,
PIKA_HAL_SPI_SPEED_HIGH,
PIKA_HAL_SPI_SPEED_VERY_HIGH,
_PIKA_HAL_SPI_SPEED_UNUSED = 0,
_PIKA_HAL_SPI_SPEED_MAX,
} PIKA_HAL_SPI_SPEED;

View File

@ -22,17 +22,17 @@ typedef enum {
} PIKA_HAL_IOCTL_CMD;
typedef enum {
_PIKA_HAL_GPIO_DIR_UNUSED = 0,
PIKA_HAL_GPIO_DIR_IN,
PIKA_HAL_GPIO_DIR_OUT,
_PIKA_HAL_GPIO_DIR_UNUSED = 0,
_PIKA_HAL_GPIO_DIR_MAX,
} PIKA_HAL_GPIO_DIR;
typedef enum {
_PIKA_HAL_GPIO_PULL_UNUSED = 0,
PIKA_HAL_GPIO_PULL_NONE,
PIKA_HAL_GPIO_PULL_UP,
PIKA_HAL_GPIO_PULL_DOWN,
_PIKA_HAL_GPIO_PULL_UNUSED = 0,
_PIKA_HAL_GPIO_PULL_MAX,
} PIKA_HAL_GPIO_PULL;
@ -48,41 +48,41 @@ typedef struct {
} pika_hal_I2C_config;
typedef enum {
_PIKA_HAL_SPI_LSB_OR_MSB_UNUSED = 0,
PIKA_HAL_SPI_LSB,
PIKA_HAL_SPI_MSB,
_PIKA_HAL_SPI_LSB_OR_MSB_UNUSED = 0,
_PIKA_HAL_SPI_LSB_OR_MSB_MAX,
} PIKA_HAL_SPI_LSB_OR_MSB;
typedef enum {
_PIKA_HAL_SPI_MASTER_OR_SLAVE_UNUSED = 0,
PIKA_HAL_SPI_MASTER,
PIKA_HAL_SPI_SLAVE,
_PIKA_HAL_SPI_MASTER_OR_SLAVE_UNUSED = 0,
_PIKA_HAL_SPI_MASTER_OR_SLAVE_MAX,
} PIKA_HAL_SPI_MASTER_OR_SLAVE;
typedef enum {
_PIKA_HAL_SPI_MODE_UNUSED = 0,
PIKA_HAL_SPI_MODE_0,
PIKA_HAL_SPI_MODE_1,
PIKA_HAL_SPI_MODE_2,
PIKA_HAL_SPI_MODE_3,
_PIKA_HAL_SPI_MODE_UNUSED = 0,
_PIKA_HAL_SPI_MODE_MAX,
} PIKA_HAL_SPI_MODE;
typedef enum {
_PIKA_HAL_SPI_DATA_UNUSED = 0,
PIKA_HAL_SPI_DATA_WIDTH_8BIT,
PIKA_HAL_SPI_DATA_WIDTH_16BIT,
_PIKA_HAL_SPI_DATA_UNUSED = 0,
_PIKA_HAL_SPI_DATA_WIDTH_MAX,
} PIKA_HAL_SPI_DATA_WIDTH;
typedef enum {
_PIKA_HAL_SPI_SPEED_UNUSED = 0,
PIKA_HAL_SPI_SPEED_LOW,
PIKA_HAL_SPI_SPEED_MEDIUM,
PIKA_HAL_SPI_SPEED_HIGH,
PIKA_HAL_SPI_SPEED_VERY_HIGH,
_PIKA_HAL_SPI_SPEED_UNUSED = 0,
_PIKA_HAL_SPI_SPEED_MAX,
} PIKA_HAL_SPI_SPEED;