mirror of
https://github.com/apache/nuttx.git
synced 2026-08-21 13:38:28 +00:00
maXTouch: Fix I2C address, errors when debug enable, reorganize some data
This commit is contained in:
parent
6fab16e6f9
commit
0d4dcdd079
1 changed files with 6 additions and 5 deletions
|
|
@ -70,9 +70,10 @@
|
|||
# define CONFIG_SAMA5D4EK_MXT_DEVMINOR 0
|
||||
#endif
|
||||
|
||||
/* The touchscreen communicates on TWI0 */
|
||||
/* The touchscreen communicates on TWI0, I2C address 0x4c */
|
||||
|
||||
#define MXT_BUSNUM 0
|
||||
#define MXT_TWI_BUS 0
|
||||
#define MXT_I2C_ADDRESS 0x4c
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
|
|
@ -128,7 +129,7 @@ static struct sama5d4ek_tscinfo_s g_mxtinfo =
|
|||
{
|
||||
.lower =
|
||||
{
|
||||
.address = (0x4c >> 1),
|
||||
.address = MXT_I2C_ADDRESS,
|
||||
.frequency = CONFIG_SAMA5D4EK_MXT_I2CFREQUENCY,
|
||||
|
||||
.attach = mxt_attach,
|
||||
|
|
@ -259,10 +260,10 @@ int arch_tcinitialize(int minor)
|
|||
|
||||
/* Get an instance of the I2C interface for the touchscreen chip select */
|
||||
|
||||
i2c = up_i2cinitialize(MXT_BUSNUM);
|
||||
i2c = up_i2cinitialize(MXT_TWI_BUS);
|
||||
if (!i2c)
|
||||
{
|
||||
idbg("Failed to initialize I2C%d\n", MXT_BUSNUM);
|
||||
idbg("Failed to initialize I2C%d\n", MXT_TWI_BUS);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue