Miya Miyagawa
/
NRP2020_main
Outher...Miura Souta
Diff: MCP/MCP.h
- Revision:
- 2:32d2cd7d744b
- Parent:
- 1:5b0303768126
- Child:
- 4:15547d07f8e5
--- a/MCP/MCP.h Tue Jan 21 11:10:33 2020 +0000 +++ b/MCP/MCP.h Thu Jan 23 09:16:38 2020 +0000 @@ -9,27 +9,22 @@ #define MCP_ADDRESS 0x40 - - -typedef enum { - a0 = 0, - a1 = 1, - a2 = 2, - a3 = 3, - a4 = 4, - a5 = 5, - a6 = 6, - a7 = 7, - b0 = 8, - b1 = 9, - b2 = 10, - b3 = 11, - b4 = 12, - b5 = 13, - b6 = 14, - b7 = 15, -}pin_name; - +#define GPA0 0 +#define GPA1 1 +#define GPA2 2 +#define GPA3 3 +#define GPA4 4 +#define GPA5 5 +#define GPA6 6 +#define GPA7 7 +#define GPB0 8 +#define GPB1 9 +#define GPB2 10 +#define GPB3 11 +#define GPB4 12 +#define GPB5 13 +#define GPB6 14 +#define GPB7 15 typedef enum { OUTPUT, @@ -63,8 +58,6 @@ void Initialize(void); // MCP register update and read new data void Update(void); - // i2c error check - bool ErrorOccurred(void); private: I2C i2c; @@ -79,6 +72,8 @@ void _Write(uint8_t address, uint8_t data); void _Read(uint8_t address, uint8_t data); + + void I2Crestart(void); };