aboutsummaryrefslogtreecommitdiffstats
path: root/i2c.h
blob: 987d1092b4deac870433f67e6abf272dffbc9b6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * i2c.h
 *
 *  Created on: 28 de abr de 2017
 *      Author: helio.capella
 */

#ifndef I2C_H_
#define I2C_H_

#include <stdint.h>

uint8_t *PTxData;                     // Pointer to TX data
uint8_t *PRxData;                     // Pointer to RX data

uint8_t TxByteCtr;
uint8_t RxByteCtr;

//uint8_t isRx;

void I2C_init(uint8_t slaveAddress);
void I2C_write(uint8_t ByteCtr, uint8_t *TxData);
void I2C_read(uint8_t ByteCtr, volatile uint8_t *RxData);

#endif /* I2C_H_ */