added hal_led_toggle to posix platforms

This commit is contained in:
Matthias Ringwald 2015-04-19 22:26:06 +02:00
parent 5e9d754eb8
commit b25b31c2f3
3 changed files with 19 additions and 0 deletions

View File

@ -50,6 +50,7 @@
#include "btstack-config.h"
#include <btstack/run_loop.h>
#include <btstack/hal_led.h>
#include "debug.h"
#include "btstack_memory.h"
@ -73,6 +74,12 @@ static void sigint_handler(int param){
exit(0);
}
static led_state = 0;
void hal_led_toggle(){
led_state = 1 - led_state;
printf("LED State %u\n", led_state);
}
int main(int argc, const char * argv[]){
/// GET STARTED with BTstack ///

View File

@ -80,6 +80,12 @@ static void sigint_handler(int param){
exit(0);
}
static led_state = 0;
void hal_led_toggle(){
led_state = 1 - led_state;
printf("LED State %u\n", led_state);
}
int main(int argc, const char * argv[]){
/// GET STARTED with BTstack ///

View File

@ -79,6 +79,12 @@ static void sigint_handler(int param){
exit(0);
}
static led_state = 0;
void hal_led_toggle(){
led_state = 1 - led_state;
printf("LED State %u\n", led_state);
}
int main(int argc, const char * argv[]){
/// GET STARTED with BTstack ///