Treat the LED driver as a peripheral with a driver

This commit is contained in:
Eric Tang
2017-07-12 20:03:50 -07:00
parent 3730733b73
commit 595ced9902
7 changed files with 9 additions and 9 deletions

View File

@@ -4,7 +4,7 @@
#include "peripherals/reset_button.h" #include "peripherals/reset_button.h"
#include "i2c.h" #include "i2c.h"
#include "i2c_watchdog.h" #include "i2c_watchdog.h"
#include "led_driver.h" #include "peripherals/led_driver.h"
#include "peripherals/merge_sensor.h" #include "peripherals/merge_sensor.h"
#include "led_pwm.h" #include "led_pwm.h"
#include "slave_scheduler.h" #include "slave_scheduler.h"
@@ -52,6 +52,7 @@ void InitI2c() {
void InitPeripherials(void) void InitPeripherials(void)
{ {
InitLedDriver();
InitResetButton(); InitResetButton();
InitMergeSensor(); InitMergeSensor();
ADC_Init(); ADC_Init();

View File

@@ -1,7 +1,7 @@
#ifndef __LED_DISPLAY_H__ #ifndef __LED_DISPLAY_H__
#define __LED_DISPLAY_H__ #define __LED_DISPLAY_H__
#include "led_driver.h" #include "peripherals/led_driver.h"
extern uint8_t LedDisplayBrightness; extern uint8_t LedDisplayBrightness;

View File

@@ -2,7 +2,7 @@
#include "init_clock.h" #include "init_clock.h"
#include "init_peripherals.h" #include "init_peripherals.h"
#include "usb_composite_device.h" #include "usb_composite_device.h"
#include "led_driver.h" #include "peripherals/led_driver.h"
#include "key_action.h" #include "key_action.h"
#include "slave_scheduler.h" #include "slave_scheduler.h"
#include "peripherals/test_led.h" #include "peripherals/test_led.h"
@@ -70,7 +70,6 @@ void main() {
init_hardware(); init_hardware();
handleUsbBusPalCommand(); handleUsbBusPalCommand();
} else { } else {
LedDriver_InitAllLeds(1);
InitSlaveScheduler(); InitSlaveScheduler();
KeyMatrix_Init(&KeyMatrix); KeyMatrix_Init(&KeyMatrix);
UpdateUsbReports(); UpdateUsbReports();

View File

@@ -1,7 +1,7 @@
#include "led_driver.h" #include "peripherals/led_driver.h"
#include "i2c_addresses.h" #include "i2c_addresses.h"
void LedDriver_InitAllLeds(char isEnabled) void InitLedDriver()
{ {
CLOCK_EnableClock(LED_DRIVER_SDB_CLOCK); CLOCK_EnableClock(LED_DRIVER_SDB_CLOCK);
PORT_SetPinMux(LED_DRIVER_SDB_PORT, LED_DRIVER_SDB_PIN, kPORT_MuxAsGpio); PORT_SetPinMux(LED_DRIVER_SDB_PORT, LED_DRIVER_SDB_PIN, kPORT_MuxAsGpio);

View File

@@ -44,6 +44,6 @@
// Functions: // Functions:
extern void LedDriver_InitAllLeds(char isEnabled); extern void InitLedDriver();
#endif #endif

View File

@@ -4,7 +4,7 @@
// Includes: // Includes:
#include "fsl_common.h" #include "fsl_common.h"
#include "led_driver.h" #include "peripherals/led_driver.h"
// Macros: // Macros:

View File

@@ -2,7 +2,7 @@
#include "system_properties.h" #include "system_properties.h"
#include "peripherals/test_led.h" #include "peripherals/test_led.h"
#include "i2c_addresses.h" #include "i2c_addresses.h"
#include "led_driver.h" #include "peripherals/led_driver.h"
#include "peripherals/merge_sensor.h" #include "peripherals/merge_sensor.h"
#include "config/parse_config.h" #include "config/parse_config.h"
#include "config/config_state.h" #include "config/config_state.h"