mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-28 04:07:47 +00:00
WIP
fixing stuff
This commit is contained in:
@@ -26,7 +26,7 @@ void logErrorGpioNotOutput(const String& prefix, int port);
|
||||
bool gpio_monitor_helper(int port, EventValueSource::Enum source, const char* Line);
|
||||
bool gpio_unmonitor_helper(int port, EventValueSource::Enum source, const char* Line);
|
||||
bool mcpgpio_range_pattern_helper(struct EventStruct *event, const char* Line, bool isWritePattern);
|
||||
|
||||
bool pcfgpio_range_pattern_helper(struct EventStruct *event, const char* Line, bool isWritePattern);
|
||||
|
||||
String Command_GPIO_Monitor(struct EventStruct *event, const char* Line)
|
||||
{
|
||||
@@ -729,7 +729,7 @@ bool pcfgpio_range_pattern_helper(struct EventStruct *event, const char* Line, b
|
||||
|
||||
for (byte i=0; i<numBytes; i++) {
|
||||
uint8_t readValue;
|
||||
byte currentAddress = firstAddress + i; ********
|
||||
byte currentAddress = firstAddress + i;
|
||||
if (currentAddress>0x27) currentAddress+=0x10;
|
||||
|
||||
byte currentMask = (mask >> (8*i)) & 0xFF;
|
||||
|
||||
@@ -271,16 +271,17 @@ int8_t GPIO_PCF_Read(int Par1)
|
||||
return state;
|
||||
}
|
||||
|
||||
uint8_t GPIO_PCF_ReadAllPins(uint8_t address)
|
||||
bool GPIO_PCF_ReadAllPins(uint8_t address, uint8_t *retValue)
|
||||
{
|
||||
uint8_t rawState = 0;
|
||||
bool success = false;
|
||||
|
||||
Wire.requestFrom(address, (uint8_t)0x1);
|
||||
if (Wire.available())
|
||||
{
|
||||
rawState =Wire.read();
|
||||
success=true;
|
||||
*retValue = Wire.read();
|
||||
}
|
||||
return rawState;
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -68,8 +68,7 @@ void GPIO_MCP_Config(int Par1, byte Par2);
|
||||
//********************************************************************************
|
||||
//@giig1967g-20181023: changed to int8_t
|
||||
int8_t GPIO_PCF_Read(int Par1);
|
||||
|
||||
uint8_t GPIO_PCF_ReadAllPins(uint8_t address);
|
||||
bool GPIO_PCF_ReadAllPins(uint8_t address, uint8_t *retValue);
|
||||
|
||||
//********************************************************************************
|
||||
// PCF8574 write
|
||||
|
||||
Reference in New Issue
Block a user