Pull up the SDB of the left LED driver.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "fsl_common.h"
|
||||
#include "fsl_port.h"
|
||||
#include "test_led.h"
|
||||
#include "init_peripherials.h"
|
||||
#include "i2c_addresses.h"
|
||||
#include "fsl_i2c.h"
|
||||
#include "fsl_clock.h"
|
||||
@@ -29,8 +30,16 @@ void InitI2c() {
|
||||
I2C_MasterInit(I2C_BUS_BASEADDR, &masterConfig, sourceClock);
|
||||
}
|
||||
|
||||
void InitLedDriver() {
|
||||
CLOCK_EnableClock(LED_DRIVER_SDB_CLOCK);
|
||||
PORT_SetPinMux(LED_DRIVER_SDB_PORT, LED_DRIVER_SDB_PIN, kPORT_MuxAsGpio);
|
||||
GPIO_PinInit(LED_DRIVER_SDB_GPIO, LED_DRIVER_SDB_PIN, &(gpio_pin_config_t){kGPIO_DigitalOutput, 0});
|
||||
GPIO_WritePinOutput(LED_DRIVER_SDB_GPIO, LED_DRIVER_SDB_PIN, 1);
|
||||
}
|
||||
|
||||
void InitPeripherials(void)
|
||||
{
|
||||
InitLedDriver();
|
||||
InitTestLed();
|
||||
InitI2c();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
#ifndef __INIT_H__
|
||||
#define __INIT_H__
|
||||
|
||||
// Macros:
|
||||
|
||||
#define LED_DRIVER_SDB_PORT PORTB
|
||||
#define LED_DRIVER_SDB_GPIO GPIOB
|
||||
#define LED_DRIVER_SDB_CLOCK kCLOCK_PortB
|
||||
#define LED_DRIVER_SDB_PIN 1
|
||||
|
||||
// Functions:
|
||||
|
||||
void InitPeripherials();
|
||||
|
||||
Reference in New Issue
Block a user