From ecf1ad24688a4c1458eaf84cc18b8a87f83637bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Thu, 28 Sep 2017 02:37:55 +0200 Subject: [PATCH] Don't use the extern keyword for functions because it's redundant. --- left/src/i2c_watchdog.h | 4 ++-- left/src/init_peripherals.h | 4 ++-- left/src/led_pwm.h | 2 +- left/src/test_led.h | 2 +- right/src/eeprom.h | 4 ++-- right/src/i2c_watchdog.h | 8 ++++++-- right/src/init_peripherals.h | 2 +- right/src/key_action.h | 2 +- right/src/led_pwm.h | 2 +- right/src/peripherals/adc.h | 4 ++-- right/src/peripherals/led_driver.h | 2 +- right/src/peripherals/merge_sensor.h | 2 +- right/src/peripherals/reset_button.h | 2 +- right/src/peripherals/test_led.h | 2 +- right/src/slave_drivers/is31fl3731_driver.h | 6 +++--- right/src/slave_drivers/uhk_module_driver.h | 4 ++-- right/src/slave_scheduler.h | 4 ++-- right/src/usb_composite_device.h | 2 +- .../src/usb_descriptors/usb_descriptor_configuration.h | 2 +- right/src/usb_descriptors/usb_descriptor_device.h | 2 +- .../usb_descriptor_generic_hid_report.h | 2 +- right/src/usb_descriptors/usb_descriptor_hid.h | 6 +++--- right/src/usb_descriptors/usb_descriptor_strings.h | 2 +- .../src/usb_interfaces/usb_interface_basic_keyboard.h | 10 +++++----- right/src/usb_interfaces/usb_interface_generic_hid.h | 7 +++---- .../src/usb_interfaces/usb_interface_media_keyboard.h | 10 +++++----- right/src/usb_interfaces/usb_interface_mouse.h | 8 ++++---- .../src/usb_interfaces/usb_interface_system_keyboard.h | 10 +++++----- right/src/usb_protocol_handler.h | 4 ++-- 29 files changed, 62 insertions(+), 59 deletions(-) diff --git a/left/src/i2c_watchdog.h b/left/src/i2c_watchdog.h index 87920cf..5a751e8 100644 --- a/left/src/i2c_watchdog.h +++ b/left/src/i2c_watchdog.h @@ -13,7 +13,7 @@ // Functions: - extern void InitI2cWatchdog(void); - extern void RunWatchdog(void); + void InitI2cWatchdog(void); + void RunWatchdog(void); #endif diff --git a/left/src/init_peripherals.h b/left/src/init_peripherals.h index a0011c1..fce7584 100644 --- a/left/src/init_peripherals.h +++ b/left/src/init_peripherals.h @@ -10,7 +10,7 @@ // Functions: - extern void InitPeripherals(void); - extern void InitI2c(void); + void InitPeripherals(void); + void InitI2c(void); #endif diff --git a/left/src/led_pwm.h b/left/src/led_pwm.h index f916495..a237e7a 100644 --- a/left/src/led_pwm.h +++ b/left/src/led_pwm.h @@ -21,7 +21,7 @@ // Functions: - extern void LedPwm_Init(void); + void LedPwm_Init(void); void LedPwm_SetBrightness(uint8_t brightnessPercent); #endif diff --git a/left/src/test_led.h b/left/src/test_led.h index 72b010a..2c3416f 100644 --- a/left/src/test_led.h +++ b/left/src/test_led.h @@ -22,6 +22,6 @@ // Functions: - extern void InitTestLed(void); + void InitTestLed(void); #endif diff --git a/right/src/eeprom.h b/right/src/eeprom.h index ad04efa..ea99956 100644 --- a/right/src/eeprom.h +++ b/right/src/eeprom.h @@ -25,7 +25,7 @@ // Functions: - extern void EEPROM_Init(void); - extern status_t EEPROM_LaunchTransfer(eeprom_transfer_t transferType, void (*successCallback)); + void EEPROM_Init(void); + status_t EEPROM_LaunchTransfer(eeprom_transfer_t transferType, void (*successCallback)); #endif diff --git a/right/src/i2c_watchdog.h b/right/src/i2c_watchdog.h index 9ae7714..cc9ecf5 100644 --- a/right/src/i2c_watchdog.h +++ b/right/src/i2c_watchdog.h @@ -1,9 +1,13 @@ #ifndef __I2C_WATCHDOG_H__ #define __I2C_WATCHDOG_H__ -// Functions: +// Variables: - extern void InitI2cWatchdog(); extern uint32_t I2C_WatchdogInnerCounter; extern uint32_t I2C_WatchdogOuterCounter; + +// Functions: + + void InitI2cWatchdog(); + #endif diff --git a/right/src/init_peripherals.h b/right/src/init_peripherals.h index 32c7055..6352620 100644 --- a/right/src/init_peripherals.h +++ b/right/src/init_peripherals.h @@ -5,6 +5,6 @@ // Functions: - extern void InitPeripherals(); + void InitPeripherals(); #endif diff --git a/right/src/key_action.h b/right/src/key_action.h index 5af75ce..d2756fb 100644 --- a/right/src/key_action.h +++ b/right/src/key_action.h @@ -90,6 +90,6 @@ // Variables: - extern void UpdateActiveUsbReports(); + void UpdateActiveUsbReports(); #endif diff --git a/right/src/led_pwm.h b/right/src/led_pwm.h index 838b782..15f4676 100644 --- a/right/src/led_pwm.h +++ b/right/src/led_pwm.h @@ -21,7 +21,7 @@ // Functions: - extern void LedPwm_Init(); + void LedPwm_Init(); void LedPwm_SetBrightness(uint8_t brightnessPercent); #endif diff --git a/right/src/peripherals/adc.h b/right/src/peripherals/adc.h index be8ff79..414ed5c 100644 --- a/right/src/peripherals/adc.h +++ b/right/src/peripherals/adc.h @@ -13,7 +13,7 @@ // Functions: - extern void ADC_Init(void); - extern uint32_t ADC_Measure(void); + void ADC_Init(void); + uint32_t ADC_Measure(void); #endif diff --git a/right/src/peripherals/led_driver.h b/right/src/peripherals/led_driver.h index 5e66051..2197e4d 100644 --- a/right/src/peripherals/led_driver.h +++ b/right/src/peripherals/led_driver.h @@ -44,6 +44,6 @@ // Functions: - extern void InitLedDriver(); + void InitLedDriver(); #endif diff --git a/right/src/peripherals/merge_sensor.h b/right/src/peripherals/merge_sensor.h index 5d66a92..283d252 100644 --- a/right/src/peripherals/merge_sensor.h +++ b/right/src/peripherals/merge_sensor.h @@ -18,6 +18,6 @@ // Functions: - extern void InitMergeSensor(); + void InitMergeSensor(); #endif diff --git a/right/src/peripherals/reset_button.h b/right/src/peripherals/reset_button.h index 4d05713..58c1d5a 100644 --- a/right/src/peripherals/reset_button.h +++ b/right/src/peripherals/reset_button.h @@ -18,6 +18,6 @@ // Functions: - extern void InitResetButton(); + void InitResetButton(); #endif diff --git a/right/src/peripherals/test_led.h b/right/src/peripherals/test_led.h index 3402841..04be5d7 100644 --- a/right/src/peripherals/test_led.h +++ b/right/src/peripherals/test_led.h @@ -22,6 +22,6 @@ // Functions: - extern void InitTestLed(); + void InitTestLed(); #endif diff --git a/right/src/slave_drivers/is31fl3731_driver.h b/right/src/slave_drivers/is31fl3731_driver.h index 804ad83..7d23227 100644 --- a/right/src/slave_drivers/is31fl3731_driver.h +++ b/right/src/slave_drivers/is31fl3731_driver.h @@ -45,8 +45,8 @@ // Functions: - extern void LedSlaveDriver_Init(uint8_t ledDriverId); - extern status_t LedSlaveDriver_Update(uint8_t ledDriverId); - extern void SetLeds(uint8_t ledBrightness); + void LedSlaveDriver_Init(uint8_t ledDriverId); + status_t LedSlaveDriver_Update(uint8_t ledDriverId); + void SetLeds(uint8_t ledBrightness); #endif diff --git a/right/src/slave_drivers/uhk_module_driver.h b/right/src/slave_drivers/uhk_module_driver.h index b4b3a17..6383e08 100644 --- a/right/src/slave_drivers/uhk_module_driver.h +++ b/right/src/slave_drivers/uhk_module_driver.h @@ -39,7 +39,7 @@ // Functions: - extern void UhkModuleSlaveDriver_Init(uint8_t uhkModuleId); - extern status_t UhkModuleSlaveDriver_Update(uint8_t uhkModuleId); + void UhkModuleSlaveDriver_Init(uint8_t uhkModuleId); + status_t UhkModuleSlaveDriver_Update(uint8_t uhkModuleId); #endif diff --git a/right/src/slave_scheduler.h b/right/src/slave_scheduler.h index 0de14e8..dd36ca4 100644 --- a/right/src/slave_scheduler.h +++ b/right/src/slave_scheduler.h @@ -39,7 +39,7 @@ // Functions: - extern void InitSlaveScheduler(); - extern void SetLeds(uint8_t ledBrightness); + void InitSlaveScheduler(); + void SetLeds(uint8_t ledBrightness); #endif diff --git a/right/src/usb_composite_device.h b/right/src/usb_composite_device.h index f887bab..310c54e 100644 --- a/right/src/usb_composite_device.h +++ b/right/src/usb_composite_device.h @@ -32,6 +32,6 @@ //Functions: - extern void InitUsb(); + void InitUsb(); #endif diff --git a/right/src/usb_descriptors/usb_descriptor_configuration.h b/right/src/usb_descriptors/usb_descriptor_configuration.h index b03e32f..57869cd 100644 --- a/right/src/usb_descriptors/usb_descriptor_configuration.h +++ b/right/src/usb_descriptors/usb_descriptor_configuration.h @@ -16,7 +16,7 @@ // Functions: - extern usb_status_t USB_DeviceGetConfigurationDescriptor( + usb_status_t USB_DeviceGetConfigurationDescriptor( usb_device_handle handle, usb_device_get_configuration_descriptor_struct_t *configurationDescriptor); #endif diff --git a/right/src/usb_descriptors/usb_descriptor_device.h b/right/src/usb_descriptors/usb_descriptor_device.h index db42874..758d8d9 100644 --- a/right/src/usb_descriptors/usb_descriptor_device.h +++ b/right/src/usb_descriptors/usb_descriptor_device.h @@ -16,7 +16,7 @@ // Functions: - extern usb_status_t USB_DeviceGetDeviceDescriptor( + usb_status_t USB_DeviceGetDeviceDescriptor( usb_device_handle handle, usb_device_get_device_descriptor_struct_t *deviceDescriptor); #endif diff --git a/right/src/usb_descriptors/usb_descriptor_generic_hid_report.h b/right/src/usb_descriptors/usb_descriptor_generic_hid_report.h index 71374a0..b51eca7 100644 --- a/right/src/usb_descriptors/usb_descriptor_generic_hid_report.h +++ b/right/src/usb_descriptors/usb_descriptor_generic_hid_report.h @@ -12,6 +12,6 @@ // Variables: - extern uint8_t UsbGenericHidReportDescriptor[USB_GENERIC_HID_REPORT_DESCRIPTOR_LENGTH]; + uint8_t UsbGenericHidReportDescriptor[USB_GENERIC_HID_REPORT_DESCRIPTOR_LENGTH]; #endif diff --git a/right/src/usb_descriptors/usb_descriptor_hid.h b/right/src/usb_descriptors/usb_descriptor_hid.h index b861c60..a8a87b3 100644 --- a/right/src/usb_descriptors/usb_descriptor_hid.h +++ b/right/src/usb_descriptors/usb_descriptor_hid.h @@ -11,13 +11,13 @@ // Functions: - extern usb_status_t USB_DeviceGetHidDescriptor( + usb_status_t USB_DeviceGetHidDescriptor( usb_device_handle handle, usb_device_get_hid_descriptor_struct_t *hidDescriptor); - extern usb_status_t USB_DeviceGetHidReportDescriptor( + usb_status_t USB_DeviceGetHidReportDescriptor( usb_device_handle handle, usb_device_get_hid_report_descriptor_struct_t *hidReportDescriptor); - extern usb_status_t USB_DeviceGetHidPhysicalDescriptor( + usb_status_t USB_DeviceGetHidPhysicalDescriptor( usb_device_handle handle, usb_device_get_hid_physical_descriptor_struct_t *hidPhysicalDescriptor); #endif diff --git a/right/src/usb_descriptors/usb_descriptor_strings.h b/right/src/usb_descriptors/usb_descriptor_strings.h index 32b172e..d5476db 100644 --- a/right/src/usb_descriptors/usb_descriptor_strings.h +++ b/right/src/usb_descriptors/usb_descriptor_strings.h @@ -15,7 +15,7 @@ // Functions: - extern usb_status_t USB_DeviceGetStringDescriptor( + usb_status_t USB_DeviceGetStringDescriptor( usb_device_handle handle, usb_device_get_string_descriptor_struct_t *stringDescriptor); #endif diff --git a/right/src/usb_interfaces/usb_interface_basic_keyboard.h b/right/src/usb_interfaces/usb_interface_basic_keyboard.h index abfbef6..eb781fe 100644 --- a/right/src/usb_interfaces/usb_interface_basic_keyboard.h +++ b/right/src/usb_interfaces/usb_interface_basic_keyboard.h @@ -36,11 +36,11 @@ // Functions: - extern usb_status_t UsbBasicKeyboardCallback(class_handle_t handle, uint32_t event, void *param); - extern usb_status_t UsbBasicKeyboardSetConfiguration(class_handle_t handle, uint8_t configuration); - extern usb_status_t UsbBasicKeyboardSetInterface(class_handle_t handle, uint8_t interface, uint8_t alternateSetting); + usb_status_t UsbBasicKeyboardCallback(class_handle_t handle, uint32_t event, void *param); + usb_status_t UsbBasicKeyboardSetConfiguration(class_handle_t handle, uint8_t configuration); + usb_status_t UsbBasicKeyboardSetInterface(class_handle_t handle, uint8_t interface, uint8_t alternateSetting); - extern void ResetActiveUsbBasicKeyboardReport(); - extern void SwitchActiveUsbBasicKeyboardReport(); + void ResetActiveUsbBasicKeyboardReport(); + void SwitchActiveUsbBasicKeyboardReport(); #endif diff --git a/right/src/usb_interfaces/usb_interface_generic_hid.h b/right/src/usb_interfaces/usb_interface_generic_hid.h index a2f1c2d..0235cdb 100644 --- a/right/src/usb_interfaces/usb_interface_generic_hid.h +++ b/right/src/usb_interfaces/usb_interface_generic_hid.h @@ -32,9 +32,8 @@ // Functions: - extern usb_status_t UsbGenericHidCallback(class_handle_t handle, uint32_t event, void *param); - extern usb_status_t UsbGenericHidSetConfiguration(class_handle_t handle, uint8_t configuration); - extern usb_status_t UsbGenericHidSetInterface(class_handle_t handle, uint8_t interface, uint8_t alternateSetting); - + usb_status_t UsbGenericHidCallback(class_handle_t handle, uint32_t event, void *param); + usb_status_t UsbGenericHidSetConfiguration(class_handle_t handle, uint8_t configuration); + usb_status_t UsbGenericHidSetInterface(class_handle_t handle, uint8_t interface, uint8_t alternateSetting); #endif diff --git a/right/src/usb_interfaces/usb_interface_media_keyboard.h b/right/src/usb_interfaces/usb_interface_media_keyboard.h index 6f0dd01..fed45bc 100644 --- a/right/src/usb_interfaces/usb_interface_media_keyboard.h +++ b/right/src/usb_interfaces/usb_interface_media_keyboard.h @@ -34,11 +34,11 @@ // Functions: - extern usb_status_t UsbMediaKeyboardCallback(class_handle_t handle, uint32_t event, void *param); - extern usb_status_t UsbMediaKeyboardSetConfiguration(class_handle_t handle, uint8_t configuration); - extern usb_status_t UsbMediaKeyboardSetInterface(class_handle_t handle, uint8_t interface, uint8_t alternateSetting); + usb_status_t UsbMediaKeyboardCallback(class_handle_t handle, uint32_t event, void *param); + usb_status_t UsbMediaKeyboardSetConfiguration(class_handle_t handle, uint8_t configuration); + usb_status_t UsbMediaKeyboardSetInterface(class_handle_t handle, uint8_t interface, uint8_t alternateSetting); - extern void ResetActiveUsbMediaKeyboardReport(); - extern void SwitchActiveUsbMediaKeyboardReport(); + void ResetActiveUsbMediaKeyboardReport(); + void SwitchActiveUsbMediaKeyboardReport(); #endif diff --git a/right/src/usb_interfaces/usb_interface_mouse.h b/right/src/usb_interfaces/usb_interface_mouse.h index c36cdd2..56373c8 100644 --- a/right/src/usb_interfaces/usb_interface_mouse.h +++ b/right/src/usb_interfaces/usb_interface_mouse.h @@ -35,10 +35,10 @@ // Functions: - extern usb_status_t UsbMouseCallback(class_handle_t handle, uint32_t event, void *param); - extern usb_status_t UsbMouseSetConfiguration(class_handle_t handle, uint8_t configuration); - extern usb_status_t UsbMouseSetInterface(class_handle_t handle, uint8_t interface, uint8_t alternateSetting); + usb_status_t UsbMouseCallback(class_handle_t handle, uint32_t event, void *param); + usb_status_t UsbMouseSetConfiguration(class_handle_t handle, uint8_t configuration); + usb_status_t UsbMouseSetInterface(class_handle_t handle, uint8_t interface, uint8_t alternateSetting); - extern usb_mouse_report_t UsbMouseReport; + usb_mouse_report_t UsbMouseReport; #endif diff --git a/right/src/usb_interfaces/usb_interface_system_keyboard.h b/right/src/usb_interfaces/usb_interface_system_keyboard.h index ce14297..96112e1 100644 --- a/right/src/usb_interfaces/usb_interface_system_keyboard.h +++ b/right/src/usb_interfaces/usb_interface_system_keyboard.h @@ -34,11 +34,11 @@ // Functions: - extern usb_status_t UsbSystemKeyboardCallback(class_handle_t handle, uint32_t event, void *param); - extern usb_status_t UsbSystemKeyboardSetConfiguration(class_handle_t handle, uint8_t configuration); - extern usb_status_t UsbSystemKeyboardSetInterface(class_handle_t handle, uint8_t interface, uint8_t alternateSetting); + usb_status_t UsbSystemKeyboardCallback(class_handle_t handle, uint32_t event, void *param); + usb_status_t UsbSystemKeyboardSetConfiguration(class_handle_t handle, uint8_t configuration); + usb_status_t UsbSystemKeyboardSetInterface(class_handle_t handle, uint8_t interface, uint8_t alternateSetting); - extern void ResetActiveUsbSystemKeyboardReport(); - extern void SwitchActiveUsbSystemKeyboardReport(); + void ResetActiveUsbSystemKeyboardReport(); + void SwitchActiveUsbSystemKeyboardReport(); #endif diff --git a/right/src/usb_protocol_handler.h b/right/src/usb_protocol_handler.h index ec4732c..0837c18 100644 --- a/right/src/usb_protocol_handler.h +++ b/right/src/usb_protocol_handler.h @@ -37,7 +37,7 @@ // Functions: - extern void UsbProtocolHandler(); - extern void ApplyConfig(void); + void UsbProtocolHandler(); + void ApplyConfig(void); #endif