Skip to content

Commit

Permalink
[#110] Minor codefactor spacing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
susanw1 committed Nov 18, 2023
1 parent 1453ead commit 9f05b6d
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,16 @@ const uint8_t I2cOutStream<ZP>::SmBusAlertAddr = 0x0C;

template<class ZP>
uint8_t I2cOutStream<ZP>::outBuffer[ZP::i2cChannelOutputBufferSize];

template<class ZP>
uint16_t I2cOutStream<ZP>::writePos = 0;

template<class ZP>
uint16_t I2cOutStream<ZP>::readPos = 0;

template<class ZP>
uint8_t I2cOutStream<ZP>::addr = 0;

template<class ZP>
bool I2cOutStream<ZP>::usingMagicAddr = false;

Expand Down Expand Up @@ -252,12 +256,16 @@ class I2cChannel : public ZscriptChannel<ZP> {

template<class ZP>
GenericCore::TokenRingBuffer<ZP> I2cChannel<ZP>::tBuffer(I2cChannel<ZP>::buffer, ZP::i2cBufferSize);

template<class ZP>
ZscriptTokenizer<ZP> I2cChannel<ZP>::tokenizer(I2cChannel<ZP>::tBuffer.getWriter(), 2);

template<class ZP>
uint8_t I2cChannel<ZP>::buffer[ZP::i2cBufferSize];

template<class ZP>
uint8_t I2cChannel<ZP>::tmp = 0;

template<class ZP>
bool I2cChannel<ZP>::usingTmp = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ class GeneralI2cAction {
return digitalRead(SDA);

}

};

}

#endif /* SRC_MAIN_CPP_ARDUINO_I2C_MODULE_COMMANDS_GENERALI2CACTION_HPP_ */
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class ZscriptI2cCapabilitiesCommand {
#endif
#endif
}

};

}

#endif /* SRC_MAIN_CPP_ARDUINO_I2C_MODULE_COMMANDS_ZSCRIPTI2CCAPABILITIESCOMMAND_HPP_ */
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ class ZscriptI2cChannelInfoCommand {
out.writeField(RespChannelCount__N, 1);
out.writeField(RespAddress__A, I2cModule<ZP>::channel.getAddress());
}

};

}

#endif //SRC_MAIN_CPP_ARDUINO_I2C_MODULE_COMMANDS_ZSCRIPTI2CCHANNELINFOCOMMAND_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ class ZscriptI2cChannelSetupCommand {
}
I2cModule<ZP>::channel.setAddress(address & 0x7F);
}

}

};

}
#endif //SRC_MAIN_CPP_ARDUINO_I2C_MODULE_COMMANDS_ZSCRIPTI2CCHANNELSETUPCOMMAND_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class ZscriptI2cSetupCommand {
#endif
}
};

}

#endif /* SRC_MAIN_CPP_ARDUINO_I2C_MODULE_COMMANDS_ZSCRIPTI2CSETUPCOMMAND_HPP_ */
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ namespace Zscript {
template<class ZP>
class ZscriptI2cNotification {
static const uint8_t SMBUS_ALERT_ADDR = 0xC;

public:
static void notification(ZscriptNotificationContext<ZP> ctx, bool moveAlong, bool isAddressing) {
(void) moveAlong;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ namespace Zscript {

template<class ZP>
class UartModule : public ZscriptModule<ZP> {

public:
#ifdef ZSCRIPT_HAVE_UART_CHANNEL
static UartChannel<ZP> channel;
Expand Down Expand Up @@ -84,6 +83,7 @@ class UartModule : public ZscriptModule<ZP> {
template<class ZP>
UartChannel<ZP> UartModule<ZP>::channel;
#endif

}

#endif /* SRC_MAIN_CPP_ARDUINO_UART_MODULE_ZSCRIPTUARTMODULE_HPP_ */
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ class UartChannel : public ZscriptChannel<ZP> {
}
}
}


};

}
#endif /* SRC_MAIN_CPP_ARDUINO_SERIAL_MODULE_CHANNELS_ZSCRIPTSERIALCHANNEL_HPP_ */
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class ZscriptUartCapabilitiesCommand: public Capabilities_CommandDefs {
out.writeField(RespAddressingSupported__A, 0);
#endif
}

};

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ class ZscriptUartChannelSetupCommand : public ChannelSetup_CommandDefs {
}
UartUtil<ZP>::writeFrequencySelection(ctx.getOutStream(), channelOut->getFrequencyIndex());
}

};

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class UartUtil {
uint8_t maxBaudBytes[4]{(maxBaud >> 24) & 0xff, (maxBaud >> 16) & 0xff, (maxBaud >> 8) & 0xff, (maxBaud) & 0xff};
out.writeBigHex(maxBaudBytes, 4);
}

};

}
Expand Down

0 comments on commit 9f05b6d

Please sign in to comment.