i2c相关修改,触摸屏功能
This commit is contained in:
1 parent
4f8260accc
commit
ea0a67e506
8 files changed
+19
-64
No files matched your search
+4
-4
@@ -133,11 +133,11 @@ extern "C"
|
||||
#endif
|
||||
|
||||
/*#define BSP_USING_I2C2*/
|
||||
//#define BSP_USING_I2C2
|
||||
#define BSP_USING_I2C2
|
||||
|
||||
#ifdef BSP_USING_I2C2
|
||||
#define BSP_I2C2_SCL_PIN GET_PIN(port, pin)
|
||||
#define BSP_I2C2_SDA_PIN GET_PIN(port, pin)
|
||||
#define BSP_I2C2_SCL_PIN GET_PIN(B, 7)
|
||||
#define BSP_I2C2_SDA_PIN GET_PIN(B, 8)
|
||||
#endif
|
||||
|
||||
/*-------------------------- I2C CONFIG END --------------------------*/
|
||||
@@ -286,7 +286,7 @@ extern "C"
|
||||
*
|
||||
*/
|
||||
/*#define BSP_USING_ONCHIP_RTC*/
|
||||
#define BSP_USING_ONCHIP_RTC
|
||||
//#define BSP_USING_ONCHIP_RTC
|
||||
|
||||
/*-------------------------- RTC CONFIG END --------------------------*/
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ static const struct rt_i2c_bit_ops stm32_bit_ops_default =
|
||||
.get_sda = stm32_get_sda,
|
||||
.get_scl = stm32_get_scl,
|
||||
.udelay = stm32_udelay,
|
||||
.delay_us = 1,
|
||||
.delay_us = 5,
|
||||
.timeout = 100
|
||||
};
|
||||
|
||||
|
||||
+3
-3
@@ -456,9 +456,9 @@ int ltdc_init(void)
|
||||
else if (lcdid == 0X7016)
|
||||
{
|
||||
lcdltdc.pwidth = 1024; lcdltdc.pheight = 600;
|
||||
lcdltdc.hsw = 70; lcdltdc.hbp = 160; lcdltdc.hfp = 160;
|
||||
lcdltdc.vsw = 10; lcdltdc.vbp = 23; lcdltdc.vfp = 12;
|
||||
ltdc_clk_set(128, 32, 5);
|
||||
lcdltdc.hsw = 20; lcdltdc.hbp = 160; lcdltdc.hfp = 160;
|
||||
lcdltdc.vsw = 3; lcdltdc.vbp = 23; lcdltdc.vfp = 12;
|
||||
ltdc_clk_set(128, 40, 5);
|
||||
}
|
||||
else if (lcdid == 0X7018)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user