initial WIP
lots of code copied over, things filled in to hopefully get the LED matrix lighting up. untested.
This commit is contained in:
28
firmware/app/comms/soft_i2c_master.h
Normal file
28
firmware/app/comms/soft_i2c_master.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* soft_i2c.h
|
||||
*/
|
||||
|
||||
#ifndef USER_COMM_SOFT_I2C_MASTER_H_
|
||||
#define USER_COMM_SOFT_I2C_MASTER_H_
|
||||
|
||||
#include <ch32x035.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
|
||||
void i2cm_init();
|
||||
|
||||
void i2cm_start();
|
||||
void i2cm_restart();
|
||||
void i2cm_stop();
|
||||
|
||||
uint8_t i2cm_rd(uint8_t ack);
|
||||
uint8_t i2cm_wr(uint8_t dat);
|
||||
uint8_t i2cm_addr(uint8_t addr, uint8_t reading_bit);
|
||||
|
||||
void i2cm_rdbuf(uint8_t *dat, uint16_t len);
|
||||
void i2cm_wrbuf(const uint8_t *dat, uint16_t len);
|
||||
|
||||
|
||||
|
||||
#endif /* USER_COMM_SOFT_I2C_MASTER_H_ */
|
||||
Reference in New Issue
Block a user