add pcf8574 i2c
This commit is contained in:
+31
-6
@@ -257,7 +257,36 @@ CONFIG_RT_USING_I2C=y
|
|||||||
# CONFIG_RT_I2C_DEBUG is not set
|
# CONFIG_RT_I2C_DEBUG is not set
|
||||||
CONFIG_RT_USING_I2C_BITOPS=y
|
CONFIG_RT_USING_I2C_BITOPS=y
|
||||||
# CONFIG_RT_I2C_BITOPS_DEBUG is not set
|
# CONFIG_RT_I2C_BITOPS_DEBUG is not set
|
||||||
# CONFIG_RT_USING_SOFT_I2C is not set
|
CONFIG_RT_USING_SOFT_I2C=y
|
||||||
|
# CONFIG_RT_USING_SOFT_I2C0 is not set
|
||||||
|
CONFIG_RT_USING_SOFT_I2C1=y
|
||||||
|
CONFIG_RT_SOFT_I2C1_SCL_PIN=34
|
||||||
|
CONFIG_RT_SOFT_I2C1_SDA_PIN=35
|
||||||
|
CONFIG_RT_SOFT_I2C1_BUS_NAME="i2c1"
|
||||||
|
CONFIG_RT_SOFT_I2C1_TIMING_DELAY=25
|
||||||
|
CONFIG_RT_SOFT_I2C1_TIMING_TIMEOUT=10
|
||||||
|
CONFIG_RT_USING_SOFT_I2C2=y
|
||||||
|
CONFIG_RT_SOFT_I2C2_SCL_PIN=4
|
||||||
|
CONFIG_RT_SOFT_I2C2_SDA_PIN=5
|
||||||
|
CONFIG_RT_SOFT_I2C2_BUS_NAME="i2c2"
|
||||||
|
CONFIG_RT_SOFT_I2C2_TIMING_DELAY=25
|
||||||
|
CONFIG_RT_SOFT_I2C2_TIMING_TIMEOUT=10
|
||||||
|
CONFIG_RT_USING_SOFT_I2C3=y
|
||||||
|
CONFIG_RT_SOFT_I2C3_SCL_PIN=36
|
||||||
|
CONFIG_RT_SOFT_I2C3_SDA_PIN=37
|
||||||
|
CONFIG_RT_SOFT_I2C3_BUS_NAME="i2c3"
|
||||||
|
CONFIG_RT_SOFT_I2C3_TIMING_DELAY=25
|
||||||
|
CONFIG_RT_SOFT_I2C3_TIMING_TIMEOUT=10
|
||||||
|
CONFIG_RT_USING_SOFT_I2C4=y
|
||||||
|
CONFIG_RT_SOFT_I2C4_SCL_PIN=30
|
||||||
|
CONFIG_RT_SOFT_I2C4_SDA_PIN=31
|
||||||
|
CONFIG_RT_SOFT_I2C4_BUS_NAME="i2c4"
|
||||||
|
CONFIG_RT_SOFT_I2C4_TIMING_DELAY=25
|
||||||
|
CONFIG_RT_SOFT_I2C4_TIMING_TIMEOUT=10
|
||||||
|
# CONFIG_RT_USING_SOFT_I2C5 is not set
|
||||||
|
# CONFIG_RT_USING_SOFT_I2C6 is not set
|
||||||
|
# CONFIG_RT_USING_SOFT_I2C7 is not set
|
||||||
|
# CONFIG_RT_USING_SOFT_I2C8 is not set
|
||||||
# CONFIG_RT_USING_PHY is not set
|
# CONFIG_RT_USING_PHY is not set
|
||||||
# CONFIG_RT_USING_PHY_V2 is not set
|
# CONFIG_RT_USING_PHY_V2 is not set
|
||||||
# CONFIG_RT_USING_ADC is not set
|
# CONFIG_RT_USING_ADC is not set
|
||||||
@@ -1460,11 +1489,7 @@ CONFIG_BSP_UART3_TX_USING_DMA=y
|
|||||||
CONFIG_BSP_USING_UART6=y
|
CONFIG_BSP_USING_UART6=y
|
||||||
CONFIG_BSP_UART6_RX_USING_DMA=y
|
CONFIG_BSP_UART6_RX_USING_DMA=y
|
||||||
CONFIG_BSP_UART6_TX_USING_DMA=y
|
CONFIG_BSP_UART6_TX_USING_DMA=y
|
||||||
CONFIG_BSP_USING_I2C=y
|
# CONFIG_BSP_USING_I2C is not set
|
||||||
CONFIG_BSP_USING_I2C1=y
|
|
||||||
CONFIG_BSP_USING_I2C2=y
|
|
||||||
CONFIG_BSP_USING_I2C3=y
|
|
||||||
CONFIG_BSP_USING_I2C4=y
|
|
||||||
# CONFIG_BSP_USING_CAN is not set
|
# CONFIG_BSP_USING_CAN is not set
|
||||||
# CONFIG_BSP_USING_ADC is not set
|
# CONFIG_BSP_USING_ADC is not set
|
||||||
# CONFIG_BSP_USING_ONCHIP_RTC is not set
|
# CONFIG_BSP_USING_ONCHIP_RTC is not set
|
||||||
|
|||||||
@@ -7,29 +7,37 @@
|
|||||||
#define DBG_LEVEL DBG_LOG
|
#define DBG_LEVEL DBG_LOG
|
||||||
#include <rtdbg.h>
|
#include <rtdbg.h>
|
||||||
|
|
||||||
struct chrg_i2c_t chrgi2c[TOTAL_I2C] = {
|
struct chrg_i2c_t chrgi2c[TOTAL_I2CS] = {
|
||||||
[IDX_I2C_1] = {
|
[IDX_I2C_1] = {
|
||||||
.dev = RT_NULL,
|
.dev = RT_NULL,
|
||||||
.name = DEV_NAME_I2C1,
|
.name = DEV_NAME_I2C1,
|
||||||
.slave = SLAVE_PCF8574_ADDR,
|
.slave = SLAVE_PCF8574_ADDR,
|
||||||
|
.opened = 0,
|
||||||
|
.port_value = 0,
|
||||||
.index = IDX_I2C_1,
|
.index = IDX_I2C_1,
|
||||||
},
|
},
|
||||||
[IDX_I2C_2] = {
|
[IDX_I2C_2] = {
|
||||||
.dev = RT_NULL,
|
.dev = RT_NULL,
|
||||||
.name = DEV_NAME_I2C2,
|
.name = DEV_NAME_I2C2,
|
||||||
.slave = SLAVE_PCF8574_ADDR,
|
.slave = SLAVE_PCF8574_ADDR,
|
||||||
|
.opened = 0,
|
||||||
|
.port_value = 0,
|
||||||
.index = IDX_I2C_2,
|
.index = IDX_I2C_2,
|
||||||
},
|
},
|
||||||
[IDX_I2C_3] = {
|
[IDX_I2C_3] = {
|
||||||
.dev = RT_NULL,
|
.dev = RT_NULL,
|
||||||
.name = DEV_NAME_I2C3,
|
.name = DEV_NAME_I2C3,
|
||||||
.slave = SLAVE_PCF8574_ADDR,
|
.slave = SLAVE_PCF8574_ADDR,
|
||||||
|
.opened = 0,
|
||||||
|
.port_value = 0,
|
||||||
.index = IDX_I2C_3,
|
.index = IDX_I2C_3,
|
||||||
},
|
},
|
||||||
[IDX_I2C_4] = {
|
[IDX_I2C_4] = {
|
||||||
.dev = RT_NULL,
|
.dev = RT_NULL,
|
||||||
.name = DEV_NAME_I2C4,
|
.name = DEV_NAME_I2C4,
|
||||||
.slave = SLAVE_PCF8574_ADDR,
|
.slave = SLAVE_PCF8574_ADDR,
|
||||||
|
.opened = 0,
|
||||||
|
.port_value = 0,
|
||||||
.index = IDX_I2C_4,
|
.index = IDX_I2C_4,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -83,14 +91,24 @@ static int chrg_i2c_init (void)
|
|||||||
{
|
{
|
||||||
struct chrg_i2c_t *pI2C = RT_NULL;
|
struct chrg_i2c_t *pI2C = RT_NULL;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
rt_err_t ret = RT_EOK;
|
||||||
|
|
||||||
for (i = 0; i < TOTAL_I2C; i++) {
|
for (i = 0; i < TOTAL_I2CS; i++) {
|
||||||
pI2C = &chrgi2c[i];
|
pI2C = &chrgi2c[i];
|
||||||
pI2C->dev = (struct rt_i2c_bus_device *)rt_device_find(pI2C->name);
|
pI2C->dev = (struct rt_i2c_bus_device *)rt_device_find(pI2C->name);
|
||||||
if (RT_NULL == pI2C->dev) {
|
if (RT_NULL == pI2C->dev) {
|
||||||
LOG_E("dev '%s' not found.", pI2C->name);
|
LOG_E("dev '%s' not found.", pI2C->name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret = rt_device_open(&pI2C->dev->parent, RT_NULL);
|
||||||
|
if (RT_EOK != ret) {
|
||||||
|
LOG_E("open '%s' failed.", pI2C->name);
|
||||||
|
pI2C->opened = 0;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
pI2C->opened = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RT_EOK;
|
return RT_EOK;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
#include <rtdevice.h>
|
#include <rtdevice.h>
|
||||||
|
|
||||||
#define SLAVE_PCF8574_ADDR 0x40
|
#define SLAVE_PCF8574_ADDR 0x20
|
||||||
|
|
||||||
#define DEV_NAME_I2C1 "i2c1"
|
#define DEV_NAME_I2C1 "i2c1"
|
||||||
#define DEV_NAME_I2C2 "i2c2"
|
#define DEV_NAME_I2C2 "i2c2"
|
||||||
@@ -17,7 +17,7 @@ typedef enum {
|
|||||||
IDX_I2C_3, // 2
|
IDX_I2C_3, // 2
|
||||||
IDX_I2C_4, // 3
|
IDX_I2C_4, // 3
|
||||||
|
|
||||||
TOTAL_I2C
|
TOTAL_I2CS
|
||||||
} eIDX_I2C;
|
} eIDX_I2C;
|
||||||
|
|
||||||
|
|
||||||
@@ -25,11 +25,13 @@ struct chrg_i2c_t {
|
|||||||
struct rt_i2c_bus_device *dev;
|
struct rt_i2c_bus_device *dev;
|
||||||
const char *name;
|
const char *name;
|
||||||
rt_uint8_t slave; // slave chip addr
|
rt_uint8_t slave; // slave chip addr
|
||||||
eIDX_I2C index;
|
rt_uint8_t opened; // 已开启I2C
|
||||||
|
rt_uint8_t port_value; // pcf8574 IO值
|
||||||
|
eIDX_I2C index; // 索引
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct chrg_i2c_t chrgi2c[TOTAL_I2C];
|
extern struct chrg_i2c_t chrgi2c[TOTAL_I2CS];
|
||||||
|
|
||||||
extern rt_uint8_t i2c_read_byte(struct chrg_i2c_t *pI2C, rt_uint8_t addr);
|
extern rt_uint8_t i2c_read_byte(struct chrg_i2c_t *pI2C, rt_uint8_t addr);
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,14 @@
|
|||||||
#include <rtdevice.h>
|
#include <rtdevice.h>
|
||||||
|
|
||||||
#include "chrg_intr.h"
|
#include "chrg_intr.h"
|
||||||
|
#include "chrg_i2c.h"
|
||||||
|
#include "chrg_pcf8574.h"
|
||||||
|
|
||||||
#define LOG_TAG "chrg.intr"
|
#define LOG_TAG "chrg.intr"
|
||||||
#define DBG_LEVEL DBG_LOG
|
#define DBG_LEVEL DBG_LOG
|
||||||
#include <rtdbg.h>
|
#include <rtdbg.h>
|
||||||
|
|
||||||
struct chrg_intr_t chrgintr[TOTAL_INTR] = {
|
struct chrg_intr_t chrgintr[TOTAL_INTRS] = {
|
||||||
[IDX_INTR_I2C1] = {
|
[IDX_INTR_I2C1] = {
|
||||||
.name = NAME_INTR_I2C1,
|
.name = NAME_INTR_I2C1,
|
||||||
.index = IDX_INTR_I2C1,
|
.index = IDX_INTR_I2C1,
|
||||||
@@ -76,11 +78,12 @@ static void chrg_intr_callback (void *args)
|
|||||||
struct chrg_intr_t *pINTR = (struct chrg_intr_t *)args;
|
struct chrg_intr_t *pINTR = (struct chrg_intr_t *)args;
|
||||||
|
|
||||||
if (RT_NULL != pINTR) {
|
if (RT_NULL != pINTR) {
|
||||||
pINTR->value = rt_pin_read(pINTR->pin);
|
chrg_pcf8574_get_port((eIDX_I2C)pINTR->index);
|
||||||
if (pINTR->delay) {
|
//pINTR->value = rt_pin_read(pINTR->pin);
|
||||||
rt_timer_start(pINTR->tmr_fd);
|
//if (pINTR->delay) {
|
||||||
}
|
// rt_timer_start(pINTR->tmr_fd);
|
||||||
LOG_I("pin '%s' intr %d.", pINTR->name, pINTR->value);
|
//}
|
||||||
|
//LOG_I("pin '%s' intr %d.", pINTR->name, pINTR->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -90,7 +93,7 @@ static int chrg_intr_init (void)
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
struct chrg_intr_t *pINTR = RT_NULL;
|
struct chrg_intr_t *pINTR = RT_NULL;
|
||||||
|
|
||||||
for (i = 0; i < TOTAL_INTR; i++) {
|
for (i = 0; i < TOTAL_INTRS; i++) {
|
||||||
pINTR = &chrgintr[i];
|
pINTR = &chrgintr[i];
|
||||||
|
|
||||||
rt_pin_mode(pINTR->pin, pINTR->mode);
|
rt_pin_mode(pINTR->pin, pINTR->mode);
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
#include "drv_gpio.h"
|
#include "drv_gpio.h"
|
||||||
|
|
||||||
|
#include "chrg_i2c.h"
|
||||||
|
|
||||||
#define NAME_INTR_I2C1 "i2c1irq"
|
#define NAME_INTR_I2C1 "i2c1irq"
|
||||||
#define NAME_INTR_I2C2 "i2c2irq"
|
#define NAME_INTR_I2C2 "i2c2irq"
|
||||||
#define NAME_INTR_I2C3 "i2c3irq"
|
#define NAME_INTR_I2C3 "i2c3irq"
|
||||||
@@ -17,12 +19,12 @@
|
|||||||
#define PIN_INTR_I2C4 GET_PIN(B, 13)
|
#define PIN_INTR_I2C4 GET_PIN(B, 13)
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
IDX_INTR_I2C1 = 0, // 0
|
IDX_INTR_I2C1 = IDX_I2C_1, // 0 中断脚关联 I2C1
|
||||||
IDX_INTR_I2C2, // 1
|
IDX_INTR_I2C2 = IDX_I2C_2, // 1 中断脚关联 I2C2
|
||||||
IDX_INTR_I2C3, // 2
|
IDX_INTR_I2C3 = IDX_I2C_3, // 2 中断脚关联 I2C3
|
||||||
IDX_INTR_I2C4, // 3
|
IDX_INTR_I2C4 = IDX_I2C_4, // 3 中断脚关联 I2C4
|
||||||
|
|
||||||
TOTAL_INTR
|
TOTAL_INTRS
|
||||||
} eIDX_INTR;
|
} eIDX_INTR;
|
||||||
|
|
||||||
struct chrg_intr_t {
|
struct chrg_intr_t {
|
||||||
@@ -36,7 +38,7 @@ struct chrg_intr_t {
|
|||||||
eIDX_INTR index;
|
eIDX_INTR index;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct chrg_intr_t chrgintr[TOTAL_INTR];
|
extern struct chrg_intr_t chrgintr[TOTAL_INTRS];
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -14,13 +14,10 @@ typedef enum {
|
|||||||
IDX_TTY_NORTH, // 1
|
IDX_TTY_NORTH, // 1
|
||||||
IDX_TTY_SOUTH, // 2
|
IDX_TTY_SOUTH, // 2
|
||||||
|
|
||||||
TOTAL_TTY
|
TOTAL_TTYS
|
||||||
} eIDX_TTY;
|
} eIDX_TTY;
|
||||||
|
|
||||||
|
|
||||||
//#define TTY_USING_TEST //使用测试功能
|
|
||||||
//#define TTY_USING_SAMPLE_SLAVE //使用从机示例
|
|
||||||
//#define TTY_USING_SAMPLE_MASTER //使用主机示例
|
|
||||||
//#define TTY_USING_DMA_RX //使用DMA接收
|
//#define TTY_USING_DMA_RX //使用DMA接收
|
||||||
//#define TTY_USING_INT_TX //使用中断发送
|
//#define TTY_USING_INT_TX //使用中断发送
|
||||||
//#define TTY_USING_DMA_TX //使用DMA发送
|
//#define TTY_USING_DMA_TX //使用DMA发送
|
||||||
|
|||||||
@@ -1,4 +1,132 @@
|
|||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <rtthread.h>
|
||||||
|
|
||||||
|
#include "chrg_i2c.h"
|
||||||
#include "chrg_pcf8574.h"
|
#include "chrg_pcf8574.h"
|
||||||
|
|
||||||
|
#define LOG_TAG "chrg.pcf"
|
||||||
|
#define DBG_LEVEL DBG_LOG
|
||||||
|
#include <rtdbg.h>
|
||||||
|
|
||||||
|
|
||||||
|
// 读取所有8口IO状态
|
||||||
|
rt_uint8_t chrg_pcf8574_get_port (eIDX_I2C idx)
|
||||||
|
{
|
||||||
|
rt_uint8_t value = 0;
|
||||||
|
if (idx >= TOTAL_I2CS) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
rt_ssize_t ret = 0;
|
||||||
|
struct chrg_i2c_t *pI2C = &chrgi2c[idx];
|
||||||
|
|
||||||
|
if (!pI2C->opened) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = rt_device_read(&pI2C->dev->parent, pI2C->slave, &value, 1);
|
||||||
|
if (ret <= 0) {
|
||||||
|
LOG_E("read failed. [%d]", ret);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
pI2C->port_value = value;
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 读取指定管脚状态值
|
||||||
|
rt_uint8_t chrg_pcf8574_get_pin (eIDX_I2C idx, uint8_t bit)
|
||||||
|
{
|
||||||
|
rt_uint8_t data = chrg_pcf8574_get_port(idx);
|
||||||
|
if (data & (1 << bit)) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置所有8口IO状态值
|
||||||
|
int chrg_pcf8574_set_port (eIDX_I2C idx, uint8_t value)
|
||||||
|
{
|
||||||
|
if (idx >= TOTAL_I2CS) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
rt_ssize_t ret = 0;
|
||||||
|
struct chrg_i2c_t *pI2C = &chrgi2c[idx];
|
||||||
|
|
||||||
|
if (!pI2C->opened) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = rt_device_write(&pI2C->dev->parent, pI2C->slave, &value, 1);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置指定管脚状态值
|
||||||
|
int chrg_pcf8574_set_pin (eIDX_I2C idx, uint8_t bit, uint8_t value)
|
||||||
|
{
|
||||||
|
if (idx >= TOTAL_I2CS) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ret = 0;
|
||||||
|
struct chrg_i2c_t *pI2C = &chrgi2c[idx];
|
||||||
|
|
||||||
|
if (!pI2C->opened) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
rt_uint8_t data = chrg_pcf8574_get_port(idx);
|
||||||
|
if (value == 0) {
|
||||||
|
data &= ~(1 << bit);
|
||||||
|
} else {
|
||||||
|
data |= 1 << bit;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = chrg_pcf8574_set_port(idx, data);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
int pcf_test (int argc, char **argv)
|
||||||
|
{
|
||||||
|
if (argc < 3) {
|
||||||
|
rt_kprintf("help : %s <get|set> <0|1|2|3> [0, 255]", argv[0]);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int idx = atoi(argv[2]);
|
||||||
|
if ((idx > 3)||(idx < 0)) {
|
||||||
|
rt_kprintf("help : %s <get|set> <0|1|2|3> [0, 255]", argv[0]);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strcmp(argv[1], "set") == 0) {
|
||||||
|
if (argc != 4) {
|
||||||
|
rt_kprintf("help : %s <get|set> <0|1|2|3> [0, 255]", argv[0]);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
rt_uint8_t val = (rt_uint8_t)atoi(argv[3]);
|
||||||
|
chrg_pcf8574_set_port((eIDX_I2C)idx, val);
|
||||||
|
} else if (strcmp(argv[1], "get") == 0) {
|
||||||
|
rt_uint8_t data = chrg_pcf8574_get_port((eIDX_I2C)idx);
|
||||||
|
rt_kprintf("value : 0x%02X", data);
|
||||||
|
} else {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
MSH_CMD_EXPORT(pcf_test, test pcf8574 port/pin.);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,22 @@
|
|||||||
#ifndef __CHRG_PCF8574_H__
|
#ifndef __CHRG_PCF8574_H__
|
||||||
#define __CHRG_PCF8574_H__
|
#define __CHRG_PCF8574_H__
|
||||||
|
|
||||||
|
#include <rtthread.h>
|
||||||
|
#include <rtdevice.h>
|
||||||
|
#include "chrg_i2c.h"
|
||||||
|
|
||||||
|
// 读取所有8口IO状态
|
||||||
|
extern rt_uint8_t chrg_pcf8574_get_port (eIDX_I2C idx);
|
||||||
|
|
||||||
|
// 读取指定管脚状态值
|
||||||
|
extern rt_uint8_t chrg_pcf8574_get_pin (eIDX_I2C idx, uint8_t bit);
|
||||||
|
|
||||||
|
// 设置所有8口IO状态值
|
||||||
|
extern int chrg_pcf8574_set_port (eIDX_I2C idx, uint8_t value);
|
||||||
|
|
||||||
|
// 设置指定管脚状态值
|
||||||
|
extern int chrg_pcf8574_set_pin (eIDX_I2C idx, uint8_t bit, uint8_t value);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ int chrg_pkg_send (eIDX_TTY idx, rt_uint8_t *data, rt_uint16_t len)
|
|||||||
case IDX_TTY_SOUTH:
|
case IDX_TTY_SOUTH:
|
||||||
// pTTY = chrgsouth.tty;
|
// pTTY = chrgsouth.tty;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((RT_NULL != pTTY)&&(RT_NULL != pTTY->dev)) {
|
if ((RT_NULL != pTTY)&&(RT_NULL != pTTY->dev)) {
|
||||||
|
|||||||
@@ -232,19 +232,19 @@ menu "On-chip Peripheral Drivers"
|
|||||||
default n
|
default n
|
||||||
select RT_USING_I2C
|
select RT_USING_I2C
|
||||||
if BSP_USING_I2C
|
if BSP_USING_I2C
|
||||||
config BSP_USING_I2C1
|
config BSP_USING_HARD_I2C1
|
||||||
bool "Enable I2C1 BUS"
|
bool "Enable I2C1 BUS"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config BSP_USING_I2C2
|
config BSP_USING_HARD_I2C2
|
||||||
bool "Enable I2C2 BUS"
|
bool "Enable I2C2 BUS"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config BSP_USING_I2C3
|
config BSP_USING_HARD_I2C3
|
||||||
bool "Enable I2C3 BUS"
|
bool "Enable I2C3 BUS"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config BSP_USING_I2C4
|
config BSP_USING_HARD_I2C4
|
||||||
bool "Enable I2C4 BUS"
|
bool "Enable I2C4 BUS"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
|
|||||||
+221
-170
@@ -337,9 +337,9 @@
|
|||||||
<v6Rtti>0</v6Rtti>
|
<v6Rtti>0</v6Rtti>
|
||||||
<VariousControls>
|
<VariousControls>
|
||||||
<MiscControls></MiscControls>
|
<MiscControls></MiscControls>
|
||||||
<Define>USE_HAL_DRIVER, __RTTHREAD__, RT_USING_LIBC, RT_USING_ARMLIBC, __CLK_TCK=RT_TICK_PER_SECOND, STM32F405xx, __STDC_LIMIT_MACROS</Define>
|
<Define>RT_USING_ARMLIBC, RT_USING_LIBC, __RTTHREAD__, __STDC_LIMIT_MACROS, STM32F405xx, __CLK_TCK=RT_TICK_PER_SECOND, USE_HAL_DRIVER</Define>
|
||||||
<Undefine></Undefine>
|
<Undefine></Undefine>
|
||||||
<IncludePath>..\..\rt-thread\components\drivers\include;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers;..\..\libs\stm32f4\STM32F4_HAL\Inc\Legacy;..\..\libs\stm32f4\STM32F4_HAL\Inc;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers\config;.;board;..\..\rt-thread\include;..\..\rt-thread\components\drivers\include;board\ports;applications;..\..\rt-thread\components\drivers\phy;..\..\libs\cmsis-core\Include;..\..\rt-thread\components\libc\posix\io\poll;..\..\rt-thread\components\libc\compilers\common\include;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\drivers\smp_call;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers\drv_flash;..\..\rt-thread\components\libc\posix\io\epoll;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\libc\posix\ipc;..\..\rt-thread\components\libc\compilers\common\extension\fcntl\octal;..\..\rt-thread\components\fal\inc;applications\utils;..\..\rt-thread\components\drivers\include;applications\thread;board\CubeMX_Config\Inc;..\..\libs\stm32f4\STM32F4_CMSIS\Include;..\..\rt-thread\components\legacy\usb\usbdevice;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers;..\..\rt-thread\components\finsh;applications\bsp;..\..\rt-thread\libcpu\arm\common;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\libc\posix\io\eventfd;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\libc\compilers\common\extension;..\..\rt-thread\libcpu\arm\cortex-m4;..\..\rt-thread\components\drivers\include</IncludePath>
|
<IncludePath>..\..\rt-thread\libcpu\arm\common;..\..\rt-thread\components\finsh;board;..\..\rt-thread\components\libc\posix\io\eventfd;..\..\rt-thread\components\drivers\phy;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\drivers\include;.;applications;..\..\rt-thread\include;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers\config;..\..\rt-thread\components\libc\posix\io\poll;..\..\rt-thread\components\drivers\include;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers\drv_flash;..\..\rt-thread\components\libc\posix\io\epoll;applications\thread;..\..\rt-thread\components\fal\inc;..\..\libs\stm32f4\STM32F4_CMSIS\Include;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\libc\compilers\common\extension;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\libc\posix\ipc;..\..\rt-thread\components\libc\compilers\common\include;applications\utils;..\..\libs\cmsis-core\Include;board\CubeMX_Config\Inc;..\..\rt-thread\components\libc\compilers\common\extension\fcntl\octal;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers;applications\bsp;..\..\rt-thread\components\drivers\include;..\..\rt-thread\libcpu\arm\cortex-m4;..\..\libs\stm32f4\STM32F4_HAL\Inc\Legacy;..\..\rt-thread\components\drivers\smp_call;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\legacy\usb\usbdevice;board\ports;..\..\rt-thread\components\drivers\include;..\..\libs\stm32f4\STM32F4_HAL\Inc;..\..\rt-thread\components\drivers\include</IncludePath>
|
||||||
</VariousControls>
|
</VariousControls>
|
||||||
</Cads>
|
</Cads>
|
||||||
<Aads>
|
<Aads>
|
||||||
@@ -393,35 +393,20 @@
|
|||||||
<Group>
|
<Group>
|
||||||
<GroupName>Applications/bsp</GroupName>
|
<GroupName>Applications/bsp</GroupName>
|
||||||
<Files>
|
<Files>
|
||||||
<File>
|
|
||||||
<FileName>chrg_fal.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>applications\bsp\chrg_fal.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>chrg_switch.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>applications\bsp\chrg_switch.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
<File>
|
||||||
<FileName>chrg_pin.c</FileName>
|
<FileName>chrg_pin.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>applications\bsp\chrg_pin.c</FilePath>
|
<FilePath>applications\bsp\chrg_pin.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
|
||||||
<FileName>chrg_vcom.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>applications\bsp\chrg_vcom.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
<File>
|
||||||
<FileName>chrg_tmr.c</FileName>
|
<FileName>chrg_tmr.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>applications\bsp\chrg_tmr.c</FilePath>
|
<FilePath>applications\bsp\chrg_tmr.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>chrg_tty.c</FileName>
|
<FileName>chrg_wdt.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>applications\bsp\chrg_tty.c</FilePath>
|
<FilePath>applications\bsp\chrg_wdt.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>chrg_i2c.c</FileName>
|
<FileName>chrg_i2c.c</FileName>
|
||||||
@@ -429,40 +414,50 @@
|
|||||||
<FilePath>applications\bsp\chrg_i2c.c</FilePath>
|
<FilePath>applications\bsp\chrg_i2c.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>chrg_wdt.c</FileName>
|
<FileName>chrg_fal.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>applications\bsp\chrg_wdt.c</FilePath>
|
<FilePath>applications\bsp\chrg_fal.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>chrg_intr.c</FileName>
|
<FileName>chrg_vcom.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>applications\bsp\chrg_intr.c</FilePath>
|
<FilePath>applications\bsp\chrg_vcom.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>chrg_tty.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>applications\bsp\chrg_tty.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>chrg_clk.c</FileName>
|
<FileName>chrg_clk.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>applications\bsp\chrg_clk.c</FilePath>
|
<FilePath>applications\bsp\chrg_clk.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>chrg_switch.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>applications\bsp\chrg_switch.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>chrg_intr.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>applications\bsp\chrg_intr.c</FilePath>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>Applications/thread</GroupName>
|
<GroupName>Applications/thread</GroupName>
|
||||||
<Files>
|
<Files>
|
||||||
<File>
|
<File>
|
||||||
<FileName>chrg_lcd.c</FileName>
|
<FileName>chrg_north.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>applications\thread\chrg_lcd.c</FilePath>
|
<FilePath>applications\thread\chrg_north.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>chrg_south.c</FileName>
|
<FileName>chrg_south.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>applications\thread\chrg_south.c</FilePath>
|
<FilePath>applications\thread\chrg_south.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
|
||||||
<FileName>chrg_north.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>applications\thread\chrg_north.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
<File>
|
||||||
<FileName>chrg_comm.c</FileName>
|
<FileName>chrg_comm.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
@@ -473,6 +468,11 @@
|
|||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>applications\thread\chrg_roll.c</FilePath>
|
<FilePath>applications\thread\chrg_roll.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>chrg_lcd.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>applications\thread\chrg_lcd.c</FilePath>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
@@ -483,16 +483,16 @@
|
|||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>applications\utils\chrg_sink.c</FilePath>
|
<FilePath>applications\utils\chrg_sink.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
|
||||||
<FileName>chrg_utils.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>applications\utils\chrg_utils.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
<File>
|
||||||
<FileName>chrg_pkg.c</FileName>
|
<FileName>chrg_pkg.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>applications\utils\chrg_pkg.c</FilePath>
|
<FilePath>applications\utils\chrg_pkg.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>chrg_utils.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>applications\utils\chrg_utils.c</FilePath>
|
||||||
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>chrg_pcf8574.c</FileName>
|
<FileName>chrg_pcf8574.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
@@ -889,6 +889,62 @@
|
|||||||
</FileArmAds>
|
</FileArmAds>
|
||||||
</FileOption>
|
</FileOption>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>dev_soft_i2c.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\rt-thread\components\drivers\i2c\dev_soft_i2c.c</FilePath>
|
||||||
|
<FileOption>
|
||||||
|
<CommonProperty>
|
||||||
|
<UseCPPCompiler>2</UseCPPCompiler>
|
||||||
|
<RVCTCodeConst>0</RVCTCodeConst>
|
||||||
|
<RVCTZI>0</RVCTZI>
|
||||||
|
<RVCTOtherData>0</RVCTOtherData>
|
||||||
|
<ModuleSelection>0</ModuleSelection>
|
||||||
|
<IncludeInBuild>1</IncludeInBuild>
|
||||||
|
<AlwaysBuild>0</AlwaysBuild>
|
||||||
|
<GenerateAssemblyFile>0</GenerateAssemblyFile>
|
||||||
|
<AssembleAssemblyFile>0</AssembleAssemblyFile>
|
||||||
|
<PublicsOnly>0</PublicsOnly>
|
||||||
|
<StopOnExitCode>3</StopOnExitCode>
|
||||||
|
<CustomArgument></CustomArgument>
|
||||||
|
<IncludeLibraryModules></IncludeLibraryModules>
|
||||||
|
<ComprImg>1</ComprImg>
|
||||||
|
</CommonProperty>
|
||||||
|
<FileArmAds>
|
||||||
|
<Cads>
|
||||||
|
<interw>2</interw>
|
||||||
|
<Optim>0</Optim>
|
||||||
|
<oTime>2</oTime>
|
||||||
|
<SplitLS>2</SplitLS>
|
||||||
|
<OneElfS>2</OneElfS>
|
||||||
|
<Strict>2</Strict>
|
||||||
|
<EnumInt>2</EnumInt>
|
||||||
|
<PlainCh>2</PlainCh>
|
||||||
|
<Ropi>2</Ropi>
|
||||||
|
<Rwpi>2</Rwpi>
|
||||||
|
<wLevel>0</wLevel>
|
||||||
|
<uThumb>2</uThumb>
|
||||||
|
<uSurpInc>2</uSurpInc>
|
||||||
|
<uC99>2</uC99>
|
||||||
|
<uGnu>2</uGnu>
|
||||||
|
<useXO>2</useXO>
|
||||||
|
<v6Lang>0</v6Lang>
|
||||||
|
<v6LangP>0</v6LangP>
|
||||||
|
<vShortEn>2</vShortEn>
|
||||||
|
<vShortWch>2</vShortWch>
|
||||||
|
<v6Lto>2</v6Lto>
|
||||||
|
<v6WtE>2</v6WtE>
|
||||||
|
<v6Rtti>2</v6Rtti>
|
||||||
|
<VariousControls>
|
||||||
|
<MiscControls> </MiscControls>
|
||||||
|
<Define>__RT_IPC_SOURCE__</Define>
|
||||||
|
<Undefine> </Undefine>
|
||||||
|
<IncludePath></IncludePath>
|
||||||
|
</VariousControls>
|
||||||
|
</Cads>
|
||||||
|
</FileArmAds>
|
||||||
|
</FileOption>
|
||||||
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>completion_comm.c</FileName>
|
<FileName>completion_comm.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
@@ -1591,11 +1647,6 @@
|
|||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers\drv_gpio.c</FilePath>
|
<FilePath>..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers\drv_gpio.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
|
||||||
<FileName>drv_soft_i2c.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers\drv_soft_i2c.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
<File>
|
||||||
<FileName>drv_tim.c</FileName>
|
<FileName>drv_tim.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
@@ -1632,9 +1683,9 @@
|
|||||||
<FilePath>..\..\rt-thread\components\fal\src\fal_partition.c</FilePath>
|
<FilePath>..\..\rt-thread\components\fal\src\fal_partition.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>fal_rtt.c</FileName>
|
<FileName>fal.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\rt-thread\components\fal\src\fal_rtt.c</FilePath>
|
<FilePath>..\..\rt-thread\components\fal\src\fal.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>fal_flash.c</FileName>
|
<FileName>fal_flash.c</FileName>
|
||||||
@@ -1642,25 +1693,25 @@
|
|||||||
<FilePath>..\..\rt-thread\components\fal\src\fal_flash.c</FilePath>
|
<FilePath>..\..\rt-thread\components\fal\src\fal_flash.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>fal.c</FileName>
|
<FileName>fal_rtt.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\rt-thread\components\fal\src\fal.c</FilePath>
|
<FilePath>..\..\rt-thread\components\fal\src\fal_rtt.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>Finsh</GroupName>
|
<GroupName>Finsh</GroupName>
|
||||||
<Files>
|
<Files>
|
||||||
<File>
|
|
||||||
<FileName>shell.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\rt-thread\components\finsh\shell.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
<File>
|
||||||
<FileName>cmd.c</FileName>
|
<FileName>cmd.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\rt-thread\components\finsh\cmd.c</FilePath>
|
<FilePath>..\..\rt-thread\components\finsh\cmd.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>shell.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\rt-thread\components\finsh\shell.c</FilePath>
|
||||||
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>msh_parse.c</FileName>
|
<FileName>msh_parse.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
@@ -2521,11 +2572,6 @@
|
|||||||
<Group>
|
<Group>
|
||||||
<GroupName>klibc</GroupName>
|
<GroupName>klibc</GroupName>
|
||||||
<Files>
|
<Files>
|
||||||
<File>
|
|
||||||
<FileName>kstdio.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\rt-thread\src\klibc\kstdio.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
<File>
|
||||||
<FileName>rt_vsnprintf_tiny.c</FileName>
|
<FileName>rt_vsnprintf_tiny.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
@@ -2546,6 +2592,11 @@
|
|||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\rt-thread\src\klibc\rt_vsscanf.c</FilePath>
|
<FilePath>..\..\rt-thread\src\klibc\rt_vsscanf.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>kstdio.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\rt-thread\src\klibc\kstdio.c</FilePath>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
@@ -2581,11 +2632,6 @@
|
|||||||
<Group>
|
<Group>
|
||||||
<GroupName>rt_usbd</GroupName>
|
<GroupName>rt_usbd</GroupName>
|
||||||
<Files>
|
<Files>
|
||||||
<File>
|
|
||||||
<FileName>cdc_vcom.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\rt-thread\components\legacy\usb\usbdevice\class\cdc_vcom.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
<File>
|
||||||
<FileName>usbdevice_core.c</FileName>
|
<FileName>usbdevice_core.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
@@ -2596,85 +2642,35 @@
|
|||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\rt-thread\components\legacy\usb\usbdevice\core\usbdevice.c</FilePath>
|
<FilePath>..\..\rt-thread\components\legacy\usb\usbdevice\core\usbdevice.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>cdc_vcom.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\rt-thread\components\legacy\usb\usbdevice\class\cdc_vcom.c</FilePath>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>STM32F4-CMSIS</GroupName>
|
<GroupName>STM32F4-CMSIS</GroupName>
|
||||||
<Files>
|
<Files>
|
||||||
<File>
|
|
||||||
<FileName>startup_stm32f405xx.s</FileName>
|
|
||||||
<FileType>2</FileType>
|
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_CMSIS\Source\Templates\arm\startup_stm32f405xx.s</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
<File>
|
||||||
<FileName>system_stm32f4xx.c</FileName>
|
<FileName>system_stm32f4xx.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_CMSIS\Source\Templates\system_stm32f4xx.c</FilePath>
|
<FilePath>..\..\libs\stm32f4\STM32F4_CMSIS\Source\Templates\system_stm32f4xx.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>startup_stm32f405xx.s</FileName>
|
||||||
|
<FileType>2</FileType>
|
||||||
|
<FilePath>..\..\libs\stm32f4\STM32F4_CMSIS\Source\Templates\arm\startup_stm32f405xx.s</FilePath>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>STM32F4-HAL</GroupName>
|
<GroupName>STM32F4-HAL</GroupName>
|
||||||
<Files>
|
<Files>
|
||||||
<File>
|
<File>
|
||||||
<FileName>stm32f4xx_hal_tim.c</FileName>
|
<FileName>stm32f4xx_hal_uart.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_tim.c</FilePath>
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_uart.c</FilePath>
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>stm32f4xx_hal_flash_ramfunc.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_flash_ramfunc.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>stm32f4xx_hal_pwr_ex.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pwr_ex.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>stm32f4xx_hal_cryp_ex.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cryp_ex.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>stm32f4xx_hal_rcc.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rcc.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>stm32f4xx_hal_flash.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_flash.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>stm32f4xx_hal_tim_ex.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_tim_ex.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>stm32f4xx_hal.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>stm32f4xx_hal_dma_ex.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_dma_ex.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>stm32f4xx_hal_pccard.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pccard.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>stm32f4xx_hal_flash_ex.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_flash_ex.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>stm32f4xx_hal_dma.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_dma.c</FilePath>
|
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>stm32f4xx_ll_usb.c</FileName>
|
<FileName>stm32f4xx_ll_usb.c</FileName>
|
||||||
@@ -2682,39 +2678,19 @@
|
|||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_ll_usb.c</FilePath>
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_ll_usb.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>stm32f4xx_hal_wwdg.c</FileName>
|
<FileName>stm32f4xx_hal_crc.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_wwdg.c</FilePath>
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_crc.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>stm32f4xx_hal_rng.c</FileName>
|
<FileName>stm32f4xx_hal.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rng.c</FilePath>
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>stm32f4xx_hal_hcd.c</FileName>
|
<FileName>stm32f4xx_hal_flash_ex.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_hcd.c</FilePath>
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_flash_ex.c</FilePath>
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>stm32f4xx_hal_cec.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cec.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>stm32f4xx_hal_pwr.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pwr.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>stm32f4xx_hal_uart.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_uart.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>stm32f4xx_hal_lptim.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_lptim.c</FilePath>
|
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>stm32f4xx_hal_pcd_ex.c</FileName>
|
<FileName>stm32f4xx_hal_pcd_ex.c</FileName>
|
||||||
@@ -2722,39 +2698,24 @@
|
|||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pcd_ex.c</FilePath>
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pcd_ex.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>stm32f4xx_hal_gpio.c</FileName>
|
<FileName>stm32f4xx_hal_pwr_ex.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_gpio.c</FilePath>
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pwr_ex.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>stm32f4xx_hal_usart.c</FileName>
|
<FileName>stm32f4xx_hal_rng.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_usart.c</FilePath>
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rng.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>stm32f4xx_hal_pcd.c</FileName>
|
<FileName>stm32f4xx_hal_tim_ex.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pcd.c</FilePath>
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_tim_ex.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>stm32f4xx_hal_crc.c</FileName>
|
<FileName>stm32f4xx_hal_tim.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_crc.c</FilePath>
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_tim.c</FilePath>
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>stm32f4xx_hal_cryp.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cryp.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>stm32f4xx_hal_rcc_ex.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rcc_ex.c</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>stm32f4xx_hal_can.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_can.c</FilePath>
|
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>stm32f4xx_hal_iwdg.c</FileName>
|
<FileName>stm32f4xx_hal_iwdg.c</FileName>
|
||||||
@@ -2766,11 +2727,101 @@
|
|||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_i2c.c</FilePath>
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_i2c.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_flash.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_flash.c</FilePath>
|
||||||
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>stm32f4xx_hal_i2c_ex.c</FileName>
|
<FileName>stm32f4xx_hal_i2c_ex.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_i2c_ex.c</FilePath>
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_i2c_ex.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_rcc_ex.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rcc_ex.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_pcd.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pcd.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_can.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_can.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_pccard.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pccard.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_dma.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_dma.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_flash_ramfunc.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_flash_ramfunc.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_cec.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cec.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_cryp_ex.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cryp_ex.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_gpio.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_gpio.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_pwr.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pwr.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_usart.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_usart.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_rcc.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rcc.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_hcd.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_hcd.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_wwdg.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_wwdg.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_cryp.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cryp.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_lptim.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_lptim.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32f4xx_hal_dma_ex.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_dma_ex.c</FilePath>
|
||||||
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>stm32f4xx_hal_cortex.c</FileName>
|
<FileName>stm32f4xx_hal_cortex.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
|
|||||||
+25
-5
@@ -160,6 +160,31 @@
|
|||||||
#define RT_CANSND_MSG_TIMEOUT 100
|
#define RT_CANSND_MSG_TIMEOUT 100
|
||||||
#define RT_USING_I2C
|
#define RT_USING_I2C
|
||||||
#define RT_USING_I2C_BITOPS
|
#define RT_USING_I2C_BITOPS
|
||||||
|
#define RT_USING_SOFT_I2C
|
||||||
|
#define RT_USING_SOFT_I2C1
|
||||||
|
#define RT_SOFT_I2C1_SCL_PIN 34
|
||||||
|
#define RT_SOFT_I2C1_SDA_PIN 35
|
||||||
|
#define RT_SOFT_I2C1_BUS_NAME "i2c1"
|
||||||
|
#define RT_SOFT_I2C1_TIMING_DELAY 25
|
||||||
|
#define RT_SOFT_I2C1_TIMING_TIMEOUT 10
|
||||||
|
#define RT_USING_SOFT_I2C2
|
||||||
|
#define RT_SOFT_I2C2_SCL_PIN 4
|
||||||
|
#define RT_SOFT_I2C2_SDA_PIN 5
|
||||||
|
#define RT_SOFT_I2C2_BUS_NAME "i2c2"
|
||||||
|
#define RT_SOFT_I2C2_TIMING_DELAY 25
|
||||||
|
#define RT_SOFT_I2C2_TIMING_TIMEOUT 10
|
||||||
|
#define RT_USING_SOFT_I2C3
|
||||||
|
#define RT_SOFT_I2C3_SCL_PIN 36
|
||||||
|
#define RT_SOFT_I2C3_SDA_PIN 37
|
||||||
|
#define RT_SOFT_I2C3_BUS_NAME "i2c3"
|
||||||
|
#define RT_SOFT_I2C3_TIMING_DELAY 25
|
||||||
|
#define RT_SOFT_I2C3_TIMING_TIMEOUT 10
|
||||||
|
#define RT_USING_SOFT_I2C4
|
||||||
|
#define RT_SOFT_I2C4_SCL_PIN 30
|
||||||
|
#define RT_SOFT_I2C4_SDA_PIN 31
|
||||||
|
#define RT_SOFT_I2C4_BUS_NAME "i2c4"
|
||||||
|
#define RT_SOFT_I2C4_TIMING_DELAY 25
|
||||||
|
#define RT_SOFT_I2C4_TIMING_TIMEOUT 10
|
||||||
#define RT_USING_WDT
|
#define RT_USING_WDT
|
||||||
#define RT_USING_PIN
|
#define RT_USING_PIN
|
||||||
#define RT_USING_HWTIMER
|
#define RT_USING_HWTIMER
|
||||||
@@ -446,11 +471,6 @@
|
|||||||
#define BSP_USING_UART6
|
#define BSP_USING_UART6
|
||||||
#define BSP_UART6_RX_USING_DMA
|
#define BSP_UART6_RX_USING_DMA
|
||||||
#define BSP_UART6_TX_USING_DMA
|
#define BSP_UART6_TX_USING_DMA
|
||||||
#define BSP_USING_I2C
|
|
||||||
#define BSP_USING_I2C1
|
|
||||||
#define BSP_USING_I2C2
|
|
||||||
#define BSP_USING_I2C3
|
|
||||||
#define BSP_USING_I2C4
|
|
||||||
#define BSP_USING_WDT
|
#define BSP_USING_WDT
|
||||||
#define BSP_USING_USBD
|
#define BSP_USING_USBD
|
||||||
#define BSP_USING_ON_CHIP_FLASH
|
#define BSP_USING_ON_CHIP_FLASH
|
||||||
|
|||||||
@@ -32,9 +32,9 @@ if GetDepend(['RT_USING_QSPI']):
|
|||||||
if GetDepend('RT_USING_SOFT_SPI'):
|
if GetDepend('RT_USING_SOFT_SPI'):
|
||||||
src += ['drv_soft_spi.c']
|
src += ['drv_soft_spi.c']
|
||||||
|
|
||||||
if GetDepend(['RT_USING_I2C', 'RT_USING_I2C_BITOPS']):
|
#if GetDepend(['RT_USING_I2C', 'RT_USING_I2C_BITOPS']):
|
||||||
if GetDepend('BSP_USING_I2C1') or GetDepend('BSP_USING_I2C2') or GetDepend('BSP_USING_I2C3') or GetDepend('BSP_USING_I2C4'):
|
# if GetDepend('BSP_USING_I2C1') or GetDepend('BSP_USING_I2C2') or GetDepend('BSP_USING_I2C3') or GetDepend('BSP_USING_I2C4'):
|
||||||
src += ['drv_soft_i2c.c']
|
# src += ['drv_soft_i2c.c']
|
||||||
|
|
||||||
if GetDepend(['RT_USING_I2C']):
|
if GetDepend(['RT_USING_I2C']):
|
||||||
if GetDepend('BSP_USING_HARD_I2C1') or GetDepend('BSP_USING_HARD_I2C2') or GetDepend('BSP_USING_HARD_I2C3') or GetDepend('BSP_USING_HARD_I2C4'):
|
if GetDepend('BSP_USING_HARD_I2C1') or GetDepend('BSP_USING_HARD_I2C2') or GetDepend('BSP_USING_HARD_I2C3') or GetDepend('BSP_USING_HARD_I2C4'):
|
||||||
|
|||||||
@@ -112,13 +112,7 @@ int wcwidth(wchar_t ucs)
|
|||||||
(ucs >= 0xf900 && ucs <= 0xfaff) || /* CJK Compatibility Ideographs */
|
(ucs >= 0xf900 && ucs <= 0xfaff) || /* CJK Compatibility Ideographs */
|
||||||
(ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */
|
(ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */
|
||||||
(ucs >= 0xff00 && ucs <= 0xff5f) || /* Fullwidth Forms */
|
(ucs >= 0xff00 && ucs <= 0xff5f) || /* Fullwidth Forms */
|
||||||
(ucs >= 0xffe0 && ucs <= 0xffe6) ||
|
(ucs >= 0xffe0 && ucs <= 0xffe6)));
|
||||||
#ifndef _WIN32
|
|
||||||
(ucs >= 0x20000 && ucs <= 0x2ffff)
|
|
||||||
#else
|
|
||||||
0
|
|
||||||
#endif
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int wcswidth(const wchar_t *pwcs, size_t n)
|
int wcswidth(const wchar_t *pwcs, size_t n)
|
||||||
|
|||||||
Reference in New Issue
Block a user