Browse Source

split resources, fix format

DrZlo13 5 năm trước cách đây
mục cha
commit
1abc98086e

+ 1 - 1
applications/ibutton/ibutton_mode_dallas_emulate.h

@@ -17,7 +17,7 @@ public:
         app = parent_app;
 
         // TODO open record
-        GpioPin one_wire_pin = {iBTN_GPIO_Port, iBTN_Pin};
+        GpioPin one_wire_pin = ibutton_gpio;
         GpioPin* one_wire_pin_record = &one_wire_pin;
         onewire_slave = new OneWireGpioSlave(one_wire_pin_record);
     };

+ 1 - 1
applications/ibutton/ibutton_mode_dallas_read.h

@@ -17,7 +17,7 @@ public:
         app = parent_app;
 
         // TODO open record
-        GpioPin one_wire_pin = {iBTN_GPIO_Port, iBTN_Pin};
+        GpioPin one_wire_pin = ibutton_gpio;
         GpioPin* one_wire_pin_record = &one_wire_pin;
         onewire = new OneWireGpio(one_wire_pin_record);
     };

+ 5 - 0
applications/music-player/music-player.c

@@ -394,6 +394,11 @@ void music_player(void* p) {
     MusicDemoContext context = {.state_mutex = &state_mutex, .event_queue = event_queue};
     osThreadId_t player = osThreadNew(music_player_thread, &context, &player_attr);
 
+    if(player == NULL) {
+        printf("cannot create player thread\n");
+        furiac_exit(NULL);
+    }
+
     MusicDemoEvent event;
     while(1) {
         osStatus_t event_status = osMessageQueueGet(event_queue, &event, NULL, 100);

+ 1 - 0
firmware/targets/f2/api-hal/api-hal-resources.c

@@ -29,3 +29,4 @@ const GpioPin led_gpio[3] = {
 
 const GpioPin backlight_gpio = {DISPLAY_BACKLIGHT_GPIO_Port, DISPLAY_BACKLIGHT_Pin};
 const GpioPin vibro_gpio = {VIBRO_GPIO_Port, VIBRO_Pin};
+const GpioPin ibutton_gpio = {iButton_GPIO_Port, iButton_Pin};

+ 1 - 0
firmware/targets/f2/api-hal/api-hal-resources.h

@@ -11,3 +11,4 @@ extern const bool input_invert[GPIO_INPUT_PINS_COUNT];
 extern const GpioPin led_gpio[3];
 extern const GpioPin backlight_gpio;
 extern const GpioPin vibro_gpio;
+extern const GpioPin ibutton_gpio;

+ 1 - 0
firmware/targets/f3/api-hal/api-hal-resources.c

@@ -27,3 +27,4 @@ const GpioPin led_gpio[3] = {
 const GpioPin backlight_gpio = {DISPLAY_BACKLIGHT_GPIO_Port, DISPLAY_BACKLIGHT_Pin};
 const GpioPin sd_cs_gpio = {SD_CS_GPIO_Port, SD_CS_Pin};
 const GpioPin vibro_gpio = {VIBRO_GPIO_Port, VIBRO_Pin};
+const GpioPin ibutton_gpio = {iBTN_GPIO_Port, iBTN_Pin};

+ 1 - 0
firmware/targets/f3/api-hal/api-hal-resources.h

@@ -12,3 +12,4 @@ extern const GpioPin led_gpio[3];
 extern const GpioPin backlight_gpio;
 extern const GpioPin sd_cs_gpio;
 extern const GpioPin vibro_gpio;
+extern const GpioPin ibutton_gpio;