Skip to content

Instantly share code, notes, and snippets.

@wailashi
Created July 31, 2017 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wailashi/3f4322985c2f752bc8e76e1bfb4a127b to your computer and use it in GitHub Desktop.
Save wailashi/3f4322985c2f752bc8e76e1bfb4a127b to your computer and use it in GitHub Desktop.
Fixes kiibohd controller build errors for infinity ergodox on arch linux.
diff --git a/Debug/cli/cli.c b/Debug/cli/cli.c
index 0b9ad37..d533755 100644
--- a/Debug/cli/cli.c
+++ b/Debug/cli/cli.c
@@ -58,7 +58,7 @@ CLIDict_Def( basicCLIDict, "General Commands" ) = {
// ----- Functions -----
-inline void prompt()
+static inline void prompt()
{
print("\033[2K\r"); // Erases the current line and resets cursor to beginning of line
print("\033[1;34m:\033[0m "); // Blue bold prompt
diff --git a/Macro/PartialMap/trigger.c b/Macro/PartialMap/trigger.c
index 3330b9e..b3bc658 100644
--- a/Macro/PartialMap/trigger.c
+++ b/Macro/PartialMap/trigger.c
@@ -91,7 +91,7 @@ extern void Macro_appendResultMacroToPendingList( const TriggerMacro *triggerMac
// ----- Functions -----
// Determine if long ResultMacro (more than 1 seqence element)
-inline uint8_t Macro_isLongResultMacro( const ResultMacro *macro )
+static inline uint8_t Macro_isLongResultMacro( const ResultMacro *macro )
{
// Check the second sequence combo length
// If non-zero return non-zero (long sequence)
@@ -104,7 +104,7 @@ inline uint8_t Macro_isLongResultMacro( const ResultMacro *macro )
// Determine if long TriggerMacro (more than 1 sequence element)
-inline uint8_t Macro_isLongTriggerMacro( const TriggerMacro *macro )
+static inline uint8_t Macro_isLongTriggerMacro( const TriggerMacro *macro )
{
// Check the second sequence combo length
// If non-zero return non-zero (long sequence)
@@ -114,7 +114,7 @@ inline uint8_t Macro_isLongTriggerMacro( const TriggerMacro *macro )
// Votes on the given key vs. guide, short macros
-inline TriggerMacroVote Macro_evalShortTriggerMacroVote( TriggerGuide *key, TriggerGuide *guide )
+static inline TriggerMacroVote Macro_evalShortTriggerMacroVote( TriggerGuide *key, TriggerGuide *guide )
{
// Depending on key type
switch ( guide->type )
@@ -165,7 +165,7 @@ inline TriggerMacroVote Macro_evalShortTriggerMacroVote( TriggerGuide *key, Trig
// Votes on the given key vs. guide, long macros
// A long macro is defined as a guide with more than 1 combo
-inline TriggerMacroVote Macro_evalLongTriggerMacroVote( TriggerGuide *key, TriggerGuide *guide )
+static inline TriggerMacroVote Macro_evalLongTriggerMacroVote( TriggerGuide *key, TriggerGuide *guide )
{
// Depending on key type
switch ( guide->type )
@@ -388,7 +388,7 @@ TriggerMacroEval Macro_evalTriggerMacro( var_uint_t triggerMacroIndex )
// Update pending trigger list
-inline void Macro_updateTriggerMacroPendingList()
+static inline void Macro_updateTriggerMacroPendingList()
{
// Iterate over the macroTriggerListBuffer to add any new Trigger Macros to the pending list
for ( var_uint_t key = 0; key < macroTriggerListBufferSize; key++ )
diff --git a/Scan/ISSILed/led_scan.c b/Scan/ISSILed/led_scan.c
index bd0baa7..c9ad49a 100644
--- a/Scan/ISSILed/led_scan.c
+++ b/Scan/ISSILed/led_scan.c
@@ -267,7 +267,7 @@ void i2c0_isr()
// ----- Functions -----
-inline void I2C_setup()
+static inline void I2C_setup()
{
// Enable I2C internal clock
SIM_SCGC4 |= SIM_SCGC4_I2C0; // Bus 0
@@ -420,7 +420,7 @@ inline void LED_setup()
}
-inline uint8_t I2C_BufferCopy( uint8_t *data, uint8_t sendLen, uint8_t recvLen, I2C_Buffer *buffer )
+static inline uint8_t I2C_BufferCopy( uint8_t *data, uint8_t sendLen, uint8_t recvLen, I2C_Buffer *buffer )
{
uint8_t reTurn = 0;
diff --git a/Scan/STLcd/lcd_scan.c b/Scan/STLcd/lcd_scan.c
index 96708cc..0e70284 100644
--- a/Scan/STLcd/lcd_scan.c
+++ b/Scan/STLcd/lcd_scan.c
@@ -101,7 +101,7 @@ CLIDict_Def( lcdCLIDict, "ST LCD Module Commands" ) = {
// ----- Functions -----
-inline void SPI_setup()
+static inline void SPI_setup()
{
// Enable SPI internal clock
SIM_SCGC6 |= SIM_SCGC6_SPI0;
@@ -208,7 +208,7 @@ void LCD_writeDisplayReg( uint8_t page, uint8_t *buffer, uint8_t len )
SPI_write( buffer, len );
}
-inline void LCD_clearPage( uint8_t page )
+static inline void LCD_clearPage( uint8_t page )
{
// Set the register page
LCD_writeControlReg( 0xB0 | ( 0x0F & page ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment