Treat the LED driver as a peripheral with a driver
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
@@ -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);
|
||||||
@@ -44,6 +44,6 @@
|
|||||||
|
|
||||||
// Functions:
|
// Functions:
|
||||||
|
|
||||||
extern void LedDriver_InitAllLeds(char isEnabled);
|
extern void InitLedDriver();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -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:
|
||||||
|
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user