Fix: unified function declarations and definitions, reverted inlining

QA: autoformat
This commit is contained in:
2022-03-11 08:40:19 +01:00
parent 60476cf7a5
commit 0e396ca2ac
3 changed files with 19 additions and 20 deletions

View File

@@ -32,7 +32,7 @@ inline void PT6302_startup (void)
PT6302_reset (); PT6302_reset ();
} }
inline void transmit_bit(const uint8_t data) static inline void transmit_bit (const uint8_t data)
{ {
PORTB &= ~CLKBpin; PORTB &= ~CLKBpin;
if ((data & 0x01) == 0) if ((data & 0x01) == 0)

View File

@@ -52,7 +52,7 @@ void PT6302_startup (void);
* Resets the VFD controller trough its reset pin * Resets the VFD controller trough its reset pin
* Handles reset delays * Handles reset delays
* ---------------------------------------------- */ * ---------------------------------------------- */
inline void PT6302_reset(void); void PT6302_reset (void);
/* -------------------------------- /* --------------------------------
* Transmits the LSB of data * Transmits the LSB of data
@@ -77,14 +77,14 @@ void transmit_bytes (const uint8_t *payload, uint8_t size);
* Sets GP1 and GP2 to the values given in the function call * Sets GP1 and GP2 to the values given in the function call
* Handles the entire communication * Handles the entire communication
* --------------------------------------------------------- */ * --------------------------------------------------------- */
inline void set_ports (uint8_t gp1, uint8_t gp2); void set_ports (uint8_t gp1, uint8_t gp2);
/* --------------------------------------------------------------------------------------- /* ---------------------------------------------------------------------------------------
* Sets the number of digit_count the VFD has * Sets the number of digit_count the VFD has
* digit_count below 9 are interpreted as 9 and digit_count above 16 are interpreted as 16 * digit_count below 9 are interpreted as 9 and digit_count above 16 are interpreted as 16
* Handles the entire communication * Handles the entire communication
* --------------------------------------------------------------------------------------- */ * --------------------------------------------------------------------------------------- */
inline void set_digits(uint8_t digit_count); void set_digits (uint8_t digit_count);
/* ----------------------------------------------------------- /* -----------------------------------------------------------
* Sets duty cycle of controlled VFD * Sets duty cycle of controlled VFD
@@ -92,7 +92,7 @@ inline void set_digits(uint8_t digit_count);
* duty = (brightness + 8)/16 (valid between 8/16 and 15/16) * duty = (brightness + 8)/16 (valid between 8/16 and 15/16)
* Handles the entire communication * Handles the entire communication
* ----------------------------------------------------------- */ * ----------------------------------------------------------- */
inline void set_duty (uint8_t brightness); void set_duty (uint8_t brightness);
/* ------------------------------------------------------------------------------------------ /* ------------------------------------------------------------------------------------------
* Set the content of the DCRAM - this will display a character from the CGROM/RAM at address * Set the content of the DCRAM - this will display a character from the CGROM/RAM at address
@@ -131,10 +131,10 @@ void set_ADRAM(uint8_t address, const uint8_t* data, uint8_t size);
* This is primarily used for testing * This is primarily used for testing
* Handles the entire communication * Handles the entire communication
* ----------------------------------------- */ * ----------------------------------------- */
inline void all_on(void); void all_on (void);
/* ------------------------------------------ /* ------------------------------------------
* Turn all outputs of the VFD controller off * Turn all outputs of the VFD controller off
* Handles the entire communication * Handles the entire communication
* ------------------------------------------ */ * ------------------------------------------ */
inline void all_off(void); void all_off (void);

1
main.c
View File

@@ -25,7 +25,6 @@
#include <util/delay.h> #include <util/delay.h>
#include "PT6302.h" #include "PT6302.h"
int main () int main ()
{ {
static const uint8_t digitstates[] = static const uint8_t digitstates[] =