[change|修改]fix some bug
@@ -26,7 +26,7 @@
#define AHT10_GET_DATA 0xAC /* 获取数据命令 */
static struct rt_i2c_bus_device *i2c_bus = RT_NULL;
-static bool initialized = RT_FALSE; /* 传感器初始化状态 */
+static rt_bool_t initialized = RT_FALSE; /* 传感器初始化状态 */
/* 写传感器寄存器 */
static rt_err_t write_reg(struct rt_i2c_bus_device *bus, rt_uint8_t reg, rt_uint8_t *data)
@@ -42,7 +42,7 @@ void beep_off(void *args)
rt_pin_write(BEEP_PIN_NUM, PIN_LOW);
}
-static void pin_sample(void)
+static void pin_beep_sample(void)
{
/* 按键0引脚为输入模式 */
rt_pin_mode(KEY0_PIN_NUM, PIN_MODE_INPUT_PULLUP);
@@ -38,7 +38,7 @@ static void serial_thread_entry(void* parameter)
char str[] = "hello RT-Thread!\r\n";
/* 查找系统中的串口设备 */
- serial = rt_device_find(UART_NAME);
+ serial = rt_device_find(SAMPLE_UART_NAME);
if (serial != RT_NULL)
@@ -21,7 +21,7 @@
#define W25Q_SPI_DEVICE_NAME "qspi10"
#endif
-static void spi_sample(int argc,char *argv[])
+static void spi_w25q_sample(void)
struct rt_spi_device *spi_dev_w25q;
rt_uint8_t w25x_read_id = 0x90;