add pcf8574 i2c

This commit is contained in:
wmano
2025-10-14 23:53:40 +08:00
parent 067f24cff0
commit 1cdc01f7cf
14 changed files with 478 additions and 220 deletions
@@ -32,10 +32,10 @@ if GetDepend(['RT_USING_QSPI']):
if GetDepend('RT_USING_SOFT_SPI'):
src += ['drv_soft_spi.c']
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'):
src += ['drv_soft_i2c.c']
#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'):
# src += ['drv_soft_i2c.c']
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'):
src += ['drv_hard_i2c.c']
@@ -112,13 +112,7 @@ int wcwidth(wchar_t ucs)
(ucs >= 0xf900 && ucs <= 0xfaff) || /* CJK Compatibility Ideographs */
(ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */
(ucs >= 0xff00 && ucs <= 0xff5f) || /* Fullwidth Forms */
(ucs >= 0xffe0 && ucs <= 0xffe6) ||
#ifndef _WIN32
(ucs >= 0x20000 && ucs <= 0x2ffff)
#else
0
#endif
));
(ucs >= 0xffe0 && ucs <= 0xffe6)));
}
int wcswidth(const wchar_t *pwcs, size_t n)