1.配置项更新。
This commit is contained in:
@@ -6,7 +6,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def Configuration mode
|
||||
* @def Configuration mode.
|
||||
*/
|
||||
#define MR_CFG_DISABLE 0
|
||||
#define MR_CFG_ENABLE 1
|
||||
@@ -14,27 +14,27 @@ extern "C" {
|
||||
//<------------------------------------ Kernel config ------------------------------------>
|
||||
|
||||
/**
|
||||
* @def Object name size config
|
||||
* @def Object name size config.
|
||||
*
|
||||
* Recommend size: 4 * n.
|
||||
*/
|
||||
#define MR_CFG_OBJECT_NAME_SIZE 12
|
||||
|
||||
/**
|
||||
* @def Debug config
|
||||
* @def Debug config.
|
||||
*
|
||||
* MR_CFG_DISABLE: Disable debug
|
||||
* MR_CFG_ENABLE: Enable debug
|
||||
* MR_CFG_DISABLE: Disable debug.
|
||||
* MR_CFG_ENABLE: Enable debug.
|
||||
*/
|
||||
#define MR_CFG_DEBUG MR_CFG_ENABLE
|
||||
|
||||
#if (MR_CFG_DEBUG == MR_CFG_ENABLE)
|
||||
|
||||
/**
|
||||
* @def Debug level config
|
||||
* @def Debug level config.
|
||||
*
|
||||
* MR_CFG_DISABLE: Disable one
|
||||
* MR_CFG_ENABLE: Enable one
|
||||
* MR_CFG_DISABLE: Disable one.
|
||||
* MR_CFG_ENABLE: Enable one.
|
||||
*/
|
||||
#define MR_CFG_DEBUG_ASSERT MR_CFG_ENABLE
|
||||
#define MR_CFG_DEBUG_ERROR MR_CFG_ENABLE
|
||||
@@ -45,123 +45,125 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def Auto init config
|
||||
* @def Auto init config.
|
||||
*
|
||||
* MR_CFG_DISABLE: Disable auto init
|
||||
* MR_CFG_ENABLE: Enable auto init
|
||||
* MR_CFG_DISABLE: Disable auto init.
|
||||
* MR_CFG_ENABLE: Enable auto init.
|
||||
*/
|
||||
#define MR_CFG_AUTO_INIT MR_CFG_ENABLE
|
||||
|
||||
//<------------------------------------ Device config ------------------------------------>
|
||||
|
||||
/**
|
||||
* @def Device config
|
||||
* @def Device config.
|
||||
*
|
||||
* MR_CFG_DISABLE: Disable device
|
||||
* MR_CFG_ENABLE: Enable device
|
||||
* MR_CFG_DISABLE: Disable device.
|
||||
* MR_CFG_ENABLE: Enable device.
|
||||
*/
|
||||
#define MR_CFG_DEVICE MR_CFG_ENABLE
|
||||
|
||||
#if (MR_CFG_DEVICE == MR_CFG_ENABLE)
|
||||
|
||||
/**
|
||||
* @def Console name config
|
||||
* @def Console name config.
|
||||
*
|
||||
* Device name, default is "uart1"
|
||||
* Device name, default is "uart1".
|
||||
*/
|
||||
#define MR_CFG_CONSOLE_NAME "uart1"
|
||||
|
||||
/**
|
||||
* @def ADC config
|
||||
* @def ADC config.
|
||||
*
|
||||
* MR_CFG_DISABLE: Disable adc
|
||||
* MR_CFG_ENABLE: Enable adc
|
||||
* MR_CFG_DISABLE: Disable adc.
|
||||
* MR_CFG_ENABLE: Enable adc.
|
||||
*/
|
||||
#define MR_CFG_ADC MR_CFG_ENABLE
|
||||
|
||||
/**
|
||||
* @def DAC config
|
||||
* @def DAC config.
|
||||
*
|
||||
* MR_CFG_DISABLE: Disable dac
|
||||
* MR_CFG_ENABLE: Enable dac
|
||||
* MR_CFG_DISABLE: Disable dac.
|
||||
* MR_CFG_ENABLE: Enable dac.
|
||||
*/
|
||||
#define MR_CFG_DAC MR_CFG_ENABLE
|
||||
|
||||
/**
|
||||
* @def I2C config
|
||||
* @def I2C config.
|
||||
*
|
||||
* MR_CFG_DISABLE: Disable i2c
|
||||
* MR_CFG_ENABLE: Enable i2c
|
||||
* MR_CFG_DISABLE: Disable i2c.
|
||||
* MR_CFG_ENABLE: Enable i2c.
|
||||
*/
|
||||
#define MR_CFG_I2C MR_CFG_ENABLE
|
||||
|
||||
/**
|
||||
* @def Pin config
|
||||
* @def Pin config.
|
||||
*
|
||||
* MR_CFG_DISABLE: Disable pin
|
||||
* MR_CFG_ENABLE: Enable pin
|
||||
* MR_CFG_DISABLE: Disable pin.
|
||||
* MR_CFG_ENABLE: Enable pin.
|
||||
*/
|
||||
#define MR_CFG_PIN MR_CFG_ENABLE
|
||||
|
||||
/**
|
||||
* @def PWM config
|
||||
* @def PWM config.
|
||||
*
|
||||
* MR_CFG_DISABLE: Disable pwm
|
||||
* MR_CFG_ENABLE: Enable pwm
|
||||
* MR_CFG_DISABLE: Disable pwm.
|
||||
* MR_CFG_ENABLE: Enable pwm.
|
||||
*/
|
||||
#define MR_CFG_PWM MR_CFG_ENABLE
|
||||
|
||||
/**
|
||||
* @def Serial config
|
||||
* @def Serial config.
|
||||
*
|
||||
* MR_CFG_DISABLE: Disable serial
|
||||
* MR_CFG_ENABLE: Enable serial
|
||||
* MR_CFG_DISABLE: Disable serial.
|
||||
* MR_CFG_ENABLE: Enable serial.
|
||||
*/
|
||||
#define MR_CFG_SERIAL MR_CFG_ENABLE
|
||||
|
||||
#if (MR_CFG_SERIAL == MR_CFG_ENABLE)
|
||||
|
||||
/**
|
||||
* @def Serial RX/TX buffer default size
|
||||
* @def Serial RX/TX buffer default size.
|
||||
*
|
||||
* If the default configuration is not required, set the value to 0
|
||||
* If the default configuration is not required, set the value to 0.
|
||||
*/
|
||||
#define MR_CFG_SERIAL_RX_BUFSZ 32
|
||||
#define MR_CFG_SERIAL_TX_BUFSZ 0
|
||||
|
||||
/**
|
||||
* @def Serial DMA config
|
||||
*
|
||||
* MR_CFG_DISABLE: Disable serial dma
|
||||
* MR_CFG_ENABLE: Enable serial dma
|
||||
*/
|
||||
#define MR_CFG_SERIAL_DMA MR_CFG_ENABLE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def SPI config
|
||||
* @def SPI config.
|
||||
*
|
||||
* MR_CFG_DISABLE: Disable spi
|
||||
* MR_CFG_ENABLE: Enable spi
|
||||
* MR_CFG_DISABLE: Disable spi.
|
||||
* MR_CFG_ENABLE: Enable spi.
|
||||
*/
|
||||
#define MR_CFG_SPI MR_CFG_ENABLE
|
||||
|
||||
#if (MR_CFG_SPI == MR_CFG_ENABLE)
|
||||
|
||||
/**
|
||||
* @def SPI RX buffer default size
|
||||
* @def SPI RX buffer default size.
|
||||
*
|
||||
* If the default configuration is not required, set the value to 0
|
||||
* If the default configuration is not required, set the value to 0.
|
||||
*/
|
||||
#define MR_CFG_SPI_RX_BUFSZ 32
|
||||
|
||||
/**
|
||||
* @def SPI TX buffer default size.
|
||||
*
|
||||
* If the default configuration is not required, set the value to 0.
|
||||
*
|
||||
* @note Not yet enabled.
|
||||
*/
|
||||
#define MR_CFG_SPI_TX_BUFSZ 0
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def Timer config
|
||||
* @def Timer config.
|
||||
*
|
||||
* MR_CFG_DISABLE: Disable timer
|
||||
* MR_CFG_ENABLE: Enable timer
|
||||
* MR_CFG_DISABLE: Disable timer.
|
||||
* MR_CFG_ENABLE: Enable timer.
|
||||
*/
|
||||
#define MR_CFG_TIMER MR_CFG_ENABLE
|
||||
|
||||
@@ -169,6 +171,7 @@ extern "C" {
|
||||
|
||||
//<------------------------------------ Module config ------------------------------------>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user