Skip to content

Commit

Permalink
fix requestFrom parameter types
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaquimFlavio authored Sep 13, 2024
1 parent ce88f2d commit 9231a11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/GuaraTeca_CI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void PCF8574::estadoPino(uint8_t pino, bool estado){

byte PCF8574::leitura(void){
//Solicita 1Byte de dados do endereço informado
Wire.requestFrom(this->_endereco, 1);
Wire.requestFrom(this->_endereco, (uint8_t) 1);

if (Wire.available()){
byte r = Wire.read();
Expand Down Expand Up @@ -95,7 +95,7 @@ void leitura_DS1307(uint8_t endereco, int vet[7]){
Wire.beginTransmission(endereco);
Wire.write(0x00);
Wire.endTransmission();
Wire.requestFrom(endereco, 7);
Wire.requestFrom(endereco, (uint8_t) 7);

vet[0] = ConverteparaDecimal(Wire.read());
vet[1] = ConverteparaDecimal(Wire.read());
Expand All @@ -112,4 +112,4 @@ byte ConverteParaBCD(byte val){ //Converte o número de decimal para BCD

byte ConverteparaDecimal(byte val) { //Converte de BCD para decimal
return ( (val/16*10) + (val%16) );
}
}

0 comments on commit 9231a11

Please sign in to comment.