48 lines
895 B
C++
48 lines
895 B
C++
/*
|
|
* leds.c
|
|
*
|
|
* This is driver for the LEDs on evaluation board for FRDM-KL25Z.
|
|
*/
|
|
|
|
/* Include the main definitions for our MCU */
|
|
//#include "MKL25Z4.h"
|
|
|
|
/* Include the header file for this driver */
|
|
#include "leds.h"
|
|
|
|
/* Include GPIO driver which we will use internally */
|
|
//#include "drv_gpio.h"
|
|
#include "simul_kl25z.h"
|
|
|
|
|
|
void LEDS_Init(void) {
|
|
|
|
/* Enable port clock, set pin function to GPIO*/
|
|
GPIO_Initialize();
|
|
|
|
/* Configure pins as output*/
|
|
pinMode(LED_GREEN, OUTPUT);
|
|
|
|
|
|
/* Turn off the LEDs; they are turned off by HIGH value. */
|
|
pinWrite(LED_GREEN, HIGH);
|
|
|
|
}
|
|
|
|
/* Turn on green LED (RGB LED on FRDM-KL25Z board) */
|
|
void LEDS_GreenOn(void) {
|
|
|
|
pinWrite(LED_GREEN, LOW);
|
|
|
|
}
|
|
|
|
|
|
/* Turn off green LED (RGB LED on FRDM-KL25Z board) */
|
|
void LEDS_GreenOff(void) {
|
|
|
|
pinWrite(LED_GREEN, HIGH);
|
|
|
|
}
|
|
|
|
// TODO: add more functions...
|