Make less use of linked files and folders for better long-term maintainability by moving the source files under the newly created src directory and only linking that directory to the workspace.
This commit is contained in:
23
right/src/test_led.h
Normal file
23
right/src/test_led.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef __TEST_LED_H__
|
||||
#define __TEST_LED_H__
|
||||
|
||||
// Includes:
|
||||
|
||||
#include "fsl_gpio.h"
|
||||
|
||||
// Macros:
|
||||
|
||||
#define LOGIC_LED_ON 0U
|
||||
#define LOGIC_LED_OFF 1U
|
||||
|
||||
#define TEST_LED_GPIO GPIOD
|
||||
#define TEST_LED_GPIO_PORT PORTD
|
||||
#define TEST_LED_GPIO_PIN 7U
|
||||
|
||||
#define TEST_RED_INIT(output) GPIO_PinInit(TEST_LED_GPIO, TEST_LED_GPIO_PIN, \
|
||||
&(gpio_pin_config_t){kGPIO_DigitalOutput, (output)})
|
||||
#define TEST_RED_ON() GPIO_ClearPinsOutput(TEST_LED_GPIO, 1U << TEST_LED_GPIO_PIN)
|
||||
#define TEST_RED_OFF() GPIO_SetPinsOutput(TEST_LED_GPIO, 1U << TEST_LED_GPIO_PIN)
|
||||
#define TEST_RED_TOGGLE() GPIO_TogglePinsOutput(TEST_LED_GPIO, 1U << TEST_LED_GPIO_PIN)
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user