1.新增各设备读写类型(仅作提示)。

This commit is contained in:
MacRsh
2023-11-17 01:32:36 +08:00
parent 1694027775
commit 12ec023851
5 changed files with 25 additions and 0 deletions

View File

@@ -29,6 +29,11 @@ extern "C" {
#define MR_CTRL_ADC_SET_CHANNEL_STATE ((0x01|0x80) << 16) /**< Set channel state */
#define MR_CTRL_ADC_GET_CHANNEL_STATE ((0x01|0x00) << 16) /**< Get channel state */
/**
* @brief ADC data type.
*/
typedef uint32_t mr_adc_data_t; /**< ADC read data type */
/**
* @brief ADC structure.
*/

View File

@@ -29,6 +29,11 @@ extern "C" {
#define MR_CTRL_DAC_SET_CHANNEL_STATE ((0x01|0x80) << 16) /**< Set channel state */
#define MR_CTRL_DAC_GET_CHANNEL_STATE ((0x01|0x00) << 16) /**< Get channel state */
/**
* @brief DAC data type.
*/
typedef uint32_t mr_dac_data_t; /**< DAC write data type */
/**
* @brief DAC structure.
*/

View File

@@ -47,6 +47,11 @@ extern "C" {
*/
#define MR_CTRL_GPIO_SET_PIN_MODE ((0x01|0x80) << 16) /**< Set pin mode */
/**
* @brief GPIO data type.
*/
typedef uint8_t mr_gpio_data_t; /**< GPIO read/write data type */
/**
* @brief GPIO structure.
*/

View File

@@ -51,6 +51,11 @@ struct mr_i2c_config
uint32_t reserved: 25;
};
/**
* @brief I2C data type.
*/
typedef uint8_t mr_i2c_data_t; /**< I2C read/write data type */
/**
* @brief I2C bus structure.
*/

View File

@@ -93,6 +93,11 @@ struct mr_spi_transfer
size_t size; /**< Transfer size */
};
/**
* @brief SPI data type.
*/
typedef uint8_t mr_spi_data_t; /**< SPI read/write data type */
/**
* @brief SPI bus structure.
*/