Added STM32 platform for debugging and development
This commit is contained in:
@@ -15,27 +15,25 @@
|
||||
#define Low 0x00
|
||||
#define High 0x01
|
||||
|
||||
#define EXIO_PIN1 0
|
||||
#define EXIO_PIN2 1
|
||||
#define EXIO_PIN3 2
|
||||
#define EXIO_PIN4 3
|
||||
#define EXIO_PIN5 4
|
||||
#define EXIO_PIN6 5
|
||||
#define EXIO_PIN7 6
|
||||
#define EXIO_PIN8 7
|
||||
|
||||
namespace drivers
|
||||
{
|
||||
class TCA9554PWR
|
||||
{
|
||||
I2C &m_i2c;
|
||||
uint8_t m_address;
|
||||
|
||||
private:
|
||||
const bool writeRegister(const uint8_t reg, const uint8_t val);
|
||||
const bool readRegister(const uint8_t reg, uint8_t &val);
|
||||
|
||||
public:
|
||||
enum
|
||||
{
|
||||
OUT_PIN1,
|
||||
OUT_PIN2,
|
||||
OUT_PIN3,
|
||||
OUT_PIN4,
|
||||
OUT_PIN5,
|
||||
OUT_PIN6,
|
||||
OUT_PIN7,
|
||||
OUT_PIN8,
|
||||
OUT_PIN_MAX
|
||||
};
|
||||
|
||||
TCA9554PWR(I2C &i2c, const uint8_t address);
|
||||
|
||||
const bool setOut(const uint8_t channel, const bool state);
|
||||
@@ -43,5 +41,11 @@ namespace drivers
|
||||
|
||||
const bool readOut(const uint8_t channel);
|
||||
const bool readPort(uint8_t &state);
|
||||
|
||||
private:
|
||||
I2C &m_i2c;
|
||||
uint8_t m_address;
|
||||
const bool writeRegister(const uint8_t reg, const uint8_t val);
|
||||
const bool readRegister(const uint8_t reg, uint8_t &val);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user