Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FreescaleIAP SimpleDMA eeprom mbed-rtos mbed
Fork of CDMS_QM_03MAR2017_Flash_with_obsrs by
i2c.h
- Committer:
- ee12b079
- Date:
- 2016-04-14
- Revision:
- 161:a63672bf4423
- Parent:
- 105:5ce0337e7c15
- Child:
- 162:48fda0b8d573
File content as of revision 161:a63672bf4423:
#define tm_len 134
#define tc_len 135
#define tc_test_len 135
const int addr = 0x20; //slave address
bool write_ack = false;
bool read_ack = false;
const int addr_pl = 0x20<<1; //PL address
uint8_t rcv_isr = 0;
int count = 0;
char PL_I2C_DATA[134];//Payload i2c array
uint8_t PL_TM_SIZE;//size of data to bev read from i2c
void FCTN_I2C_WRITE_PL(char *data2,uint8_t tc_len2)
{
write_ack = master.write(addr_pl|0x00,data2,tc_len2);//address to be defined in payload
if(write_ack == 1)
{
printf("\n\rdata not sent\n");
}
}
void isr_pyldtm()
{
read_ack = master.read(addr_pl|1,PL_I2C_DATA,134);
gLEDR=!gLEDR;
rcv_isr = 1;
}
