Skip to content

Commit

Permalink
More diddling with the button thread and LED sequencing.
Browse files Browse the repository at this point in the history
  • Loading branch information
ab1aw committed Feb 26, 2019
1 parent 68f4b99 commit 01b22b9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions user/apps/gpioer/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ static L4_ThreadId_t threads[2] __USER_DATA;
#define BOARD_LED_PIN4 15

static uint8_t board_leds[BOARD_LED_NUM] __USER_DATA;
static int count __USER_DATA;


static inline void __USER_TEXT led_init(void)
{
Expand Down Expand Up @@ -61,8 +63,6 @@ static inline void __USER_TEXT leds_onoff(int count)
__USER_TEXT
void *gpioer_thread(void *arg)
{
int count = 0;

printf("gpioer thread: built-in leds blinking\n");
led_init();
while (1)
Expand Down Expand Up @@ -93,9 +93,7 @@ void *gpioer_thread(void *arg)
__USER_TEXT
void *button_monitor_thread(void *arg)
{
int count = 1;

// gpio_config_input(GPIOA, BUTTON_CUSTOM_PIN, GPIO_PUPDR_DOWN);
gpio_config_input(GPIOA, BUTTON_CUSTOM_PIN, GPIO_PUPDR_DOWN);
printf("thread: built-in user button detection\n");
while (1)
{
Expand All @@ -112,6 +110,8 @@ void *button_monitor_thread(void *arg)
__USER_TEXT
static void *main(void *user)
{
count = 0;

threads[GPIOER_THREAD] = pager_create_thread();
threads[BUTTON_MONITOR_THREAD] = pager_create_thread();

Expand Down

0 comments on commit 01b22b9

Please sign in to comment.