コンテンツにスキップ

LEDの点灯

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "bsp.h"

#define LED1 BSP_BOARD_LED_0
#define LED2 BSP_BOARD_LED_1
#define LED3 BSP_BOARD_LED_2
#define LED4 BSP_BOARD_LED_3

/**@brief Function for application main entry.
 */
int main(void)
{               
        bsp_board_leds_init();
        bsp_board_led_on(LED1);
        bsp_board_led_on(LED2);
        bsp_board_led_on(LED3);
        bsp_board_led_on(LED4);
}


/**
 * @}
 */
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "bsp.h"

#define LED1 BSP_BOARD_LED_0
#define LED2 BSP_BOARD_LED_1
#define LED3 BSP_BOARD_LED_2
#define LED4 BSP_BOARD_LED_3

/**@brief Function for the LEDs initialization.
 *
 * @details Initializes all LEDs used by the application.
 */
static void leds_init(void)
{
    bsp_board_leds_init();
}

/**@brief Function for application main entry.
 */
int main(void)
{               
        leds_init();
        bsp_board_led_on(LED1);
        bsp_board_led_on(LED2);
        bsp_board_led_on(LED3);
        bsp_board_led_on(LED4);
}


/**
 * @}
 */