Apply pointer formatting

This commit is contained in:
Scott Lahteine
2021-03-29 20:36:37 -05:00
parent 71e789943e
commit 3b73b115ca
102 changed files with 364 additions and 364 deletions

View File

@ -42,7 +42,7 @@ struct MinSerial {
HAL_min_serial_out(ch);
}
// Send String through UART
static void TX(const char* s) { while (*s) TX(*s++); }
static void TX(const char *s) { while (*s) TX(*s++); }
// Send a digit through UART
static void TXDigit(uint32_t d) {
if (d < 10) TX((char)(d+'0'));

View File

@ -71,10 +71,10 @@ void spiSend(uint8_t b);
uint8_t spiRec();
// Read from SPI into buffer
void spiRead(uint8_t* buf, uint16_t nbyte);
void spiRead(uint8_t *buf, uint16_t nbyte);
// Write token and then write from 512 byte buffer to SPI (for SD card)
void spiSendBlock(uint8_t token, const uint8_t* buf);
void spiSendBlock(uint8_t token, const uint8_t *buf);
// Begin SPI transaction, set clock, bit order, data mode
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode);
@ -87,7 +87,7 @@ void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode);
void spiSend(uint32_t chan, byte b);
// Write buffer to specified SPI channel
void spiSend(uint32_t chan, const uint8_t* buf, size_t n);
void spiSend(uint32_t chan, const uint8_t *buf, size_t n);
// Read single byte from specified SPI channel
uint8_t spiRec(uint32_t chan);

View File

@ -44,7 +44,7 @@ static bool UnwReportOut(void* ctx, const UnwReport* bte) {
}
#ifdef UNW_DEBUG
void UnwPrintf(const char* format, ...) {
void UnwPrintf(const char *format, ...) {
char dest[256];
va_list argptr;
va_start(argptr, format);

View File

@ -45,11 +45,11 @@ public:
// Read one or more bytes of data and update the CRC
// Return 'true' on read error
static bool read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing=true);
static bool read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing=true);
// Write one or more bytes of data
// Return 'true' on write error
static inline bool write_data(const int pos, const uint8_t* value, const size_t size=sizeof(uint8_t)) {
static inline bool write_data(const int pos, const uint8_t *value, const size_t size=sizeof(uint8_t)) {
int data_pos = pos;
uint16_t crc = 0;
return write_data(data_pos, value, size, &crc);
@ -61,7 +61,7 @@ public:
// Read one or more bytes of data
// Return 'true' on read error
static inline bool read_data(const int pos, uint8_t* value, const size_t size=1) {
static inline bool read_data(const int pos, uint8_t *value, const size_t size=1) {
int data_pos = pos;
uint16_t crc = 0;
return read_data(data_pos, value, size, &crc);

View File

@ -55,7 +55,7 @@ static void _eeprom_begin(uint8_t * const pos, const uint8_t cmd) {
// Leave the Bus in-use
}
uint8_t eeprom_read_byte(uint8_t* pos) {
uint8_t eeprom_read_byte(uint8_t *pos) {
_eeprom_begin(pos, CMD_READ); // Set read location and begin transmission
const uint8_t v = spiRec(SPI_CHAN_EEPROM1); // After READ a value sits on the Bus