Following table describes function Write_I2C.
Function name
Function prototype
Behavior description
Input parameter1
Input parameter2
Input parameter3
Return value
Example
4.2.5 Initial .c
Following table describes the initial library:
Function Name
void Initial(void)
Following table describes how to use these functions.
Function name
Function prototype
Behavior description
Input parameter
Return value
Example
MB2146-460-E Setup Guide V1.2
Chapter 4 Sample Code Manual
void Write_I2C(unsigned char DevAddr, unsigned char SubAddr, unsigned
char WDat)
Write data to slave device
DevAddr: slave device address
SubAddr: slave device sub-addres
WDat: data written to slave device
None
Write data 0x18 to EEPROM sub-address 0x22:
Write_I2C (0xa0,0x22,0x18);
Initialize global variable
void Initial(void)
Initialize global parameter
None
None
Initialize key status to 0 and coordinate status to 0:
Initial ();
MCU-AN-500083-E-12 – Page 31
Write_I2C
Description
Initial