Move source code to firmware directory

This commit is contained in:
2020-11-13 11:18:21 +01:00
parent ed34a0a578
commit bc9ad5f8cc
13 changed files with 0 additions and 0 deletions

16
firmware/i2c.h Normal file
View File

@@ -0,0 +1,16 @@
#ifndef __I2C_H__
#define __I2C_H__
#define I2C_ACK 1
#define I2C_NACK 0
#define I2C_READ 1
void i2c_init(uint32_t bitrate);
void i2c_start(void);
void i2c_stop(void);
uint8_t i2c_read(uint8_t ack);
void i2c_write(uint8_t byte);
void i2c_readbuf(uint8_t sla, uint8_t adr, uint8_t len, uint8_t* buf);
void i2c_writebuf(uint8_t sla, uint8_t adr, uint8_t len, uint8_t* buf);
#endif