Skip to content

Commit

Permalink
Remove RebbleOS.h
Browse files Browse the repository at this point in the history
Remove RebbleOS.h
  • Loading branch information
AliceGrey committed Nov 29, 2020
1 parent 680db4f commit b433244
Show file tree
Hide file tree
Showing 69 changed files with 162 additions and 152 deletions.
3 changes: 1 addition & 2 deletions Apps/System/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
*
* Author: Barry Carter <barry.carter@gmail.com>.
*/

#include "rebbleos.h"
#include "display.h"
#include "menu.h"

static list_head _res_list_head = LIST_HEAD(_res_list_head);
Expand Down
3 changes: 1 addition & 2 deletions Apps/System/notification.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
* Author: Carson Katri <me@carsonkatri.com>
* Barry Carter <barry.carter@gmail.com>
*/

#include "rebbleos.h"
#include "display.h"
#include "notification.h"
#include "single_notification_layer.h"
#include "librebble.h"
Expand Down
1 change: 0 additions & 1 deletion Apps/System/notification.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* Author: Carson Katri <me@carsonkatri.com>.
*/

#include "rebbleos.h"
#include "librebble.h"
#include "display.h"
#include "backlight.h"
Expand Down
1 change: 0 additions & 1 deletion Apps/System/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Author: Joshua Wise <joshua@joshuawise.com>
*/

#include "rebbleos.h"
#include "menu.h"
#include "status_bar_layer.h"
#include "action_bar_layer.h"
Expand Down
1 change: 0 additions & 1 deletion Apps/System/settings_tz.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Author: Joshua Wise <joshua@joshuawise.com>
*/

#include "rebbleos.h"
#include "menu.h"
#include "status_bar_layer.h"
#include "action_bar_layer.h"
Expand Down
3 changes: 1 addition & 2 deletions Apps/System/systemapp.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
*
* Author: Barry Carter <barry.carter@gmail.com>
*/

#include "rebbleos.h"
#include "display.h"
#include "systemapp.h"
#include "menu.h"
#include "status_bar_layer.h"
Expand Down
5 changes: 2 additions & 3 deletions Apps/System/testapp.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
*
* Author: Barry Carter <barry.carter@gmail.com>
*/

#include "rebbleos.h"
#include "display.h"
#include "menu.h"
#include "status_bar_layer.h"
#include "test_defs.h"
#include "platform_res.h"

static Window *s_main_window;
static Menu *s_menu;
StatusBarLayer *status_bar;
static StatusBarLayer *status_bar;

static void testapp_exec_window_unload(Window *window);
static void _reset_menu_items(void);
Expand Down
2 changes: 1 addition & 1 deletion Apps/System/tests/color_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Author: Author: Chris Multhaupt <chris.multhaupt@gmail.com>.
*/
#include "rebbleos.h"
#include "display.h"
#include "systemapp.h"
#include "menu.h"
#include "status_bar_layer.h"
Expand Down
3 changes: 1 addition & 2 deletions Apps/System/tests/overlay_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
*
* Author: Barry Carter <barry.carter@gmail.com>.
*/

#include "rebbleos.h"
#include "display.h"
#include "systemapp.h"
#include "menu.h"
#include "status_bar_layer.h"
Expand Down
2 changes: 1 addition & 1 deletion Apps/System/tests/test_test.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "rebbleos.h"
#include "display.h"
#include "systemapp.h"
#include "menu.h"
#include "status_bar_layer.h"
Expand Down
3 changes: 1 addition & 2 deletions Apps/System/tests/vibes_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
*
* Author: Author: Elliot Hawkins <elliotshawkins@gmail.com>.
*/

#include "rebbleos.h"
#include "display.h"
#include "systemapp.h"
#include "menu.h"
#include "status_bar_layer.h"
Expand Down
5 changes: 2 additions & 3 deletions Apps/System/widgettest.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
*
* Author: Carson Katri <me@carsonkatri.com>
*/

#include "rebbleos.h"
#include "display.h"
#include "test.h"
#include "librebble.h"
#include "bitmap_layer.h"
Expand All @@ -18,7 +17,7 @@ const char * const test_name = "Test";
static Window *s_main_window;

ActionBarLayer *action_bar;
StatusBarLayer *status_bar;
static StatusBarLayer *status_bar;

typedef struct {
uint8_t hours;
Expand Down
3 changes: 2 additions & 1 deletion hw/drivers/stm32_bluetooth_cc256x/btstack_rebble.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#include "btstack_rebble.h"
#include "btstack_chipset_cc256x.h"
#include "hal_uart_dma.h"
#include "rebbleos.h"
#include "main.h"
#include "init.h"
#include "btstack_spp.h"
#include "hal_time_ms.h"
#include "rbl_bluetooth.h"
Expand Down
3 changes: 2 additions & 1 deletion hw/platform/chalk/chalk_bluetooth.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "rebbleos.h"
#include "rbl_bluetooth.h"
#include "init.h"

/*
* NOT IMPLEMENTED
Expand Down
1 change: 0 additions & 1 deletion hw/platform/qemu/hw_qemu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "hw_qemu.h"
#include "stm32_usart.h"
#include "stm32_power.h"
#include "rebbleos.h"

void _hw_qemu_rx(void);

Expand Down
1 change: 0 additions & 1 deletion rcore/api_func_symbols.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "common.h"
#include "rebbleos.h"
#include "librebble.h"
#include "graphics_wrapper.h"
#include "libros_graphics.h"
Expand Down
4 changes: 3 additions & 1 deletion rcore/appmanager.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
*
* Author: Barry Carter <barry.carter@gmail.com>.
*/

#include "rebble_memory.h"
#include <stdlib.h>
#include "appmanager_thread.h"
#include "display.h"
#include "librebble.h"
#include "appmanager.h"

#include "systemapp.h"
Expand Down
2 changes: 1 addition & 1 deletion rcore/appmanager_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

#include <stdlib.h>
#include "rebbleos.h"
#include "display.h"
#include "appmanager.h"
#include "systemapp.h"
#include "widgettest.h"
Expand Down
3 changes: 2 additions & 1 deletion rcore/appmanager_app_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
*/

#include <stdlib.h>
#include "rebbleos.h"
#include "display.h"
#include "appmanager.h"
#include "main.h"
#include "overlay_manager.h"
#include "protocol.h"
#include "protocol_music.h"
Expand Down
4 changes: 3 additions & 1 deletion rcore/appmanager_app_runloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
*/

#include <stdlib.h>
#include "rebbleos.h"
#include "display.h"
#include "appmanager.h"
#include "main.h"
#include "overlay_manager.h"
#include "notification_manager.h"
#include "timers.h"
#include "ngfxwrap.h"
#include "event_service.h"


/* Configure Logging */
#define MODULE_NAME "apploop"
#define MODULE_TYPE "APLOOP"
Expand Down
3 changes: 2 additions & 1 deletion rcore/appmanager_app_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
*/

#include <stdlib.h>
#include "rebbleos.h"
#include "display.h"
#include "appmanager.h"
#include "main.h"
#include "overlay_manager.h"
#include "notification_manager.h"

Expand Down
4 changes: 3 additions & 1 deletion rcore/bluetooth.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*/

#include "FreeRTOS.h"
#include "librebble.h"
#include "task.h" /* xTaskCreate */
#include "timers.h" /* xTimerCreate */
#include "queue.h" /* xQueueCreate */
Expand All @@ -32,7 +33,7 @@
#include "backlight.h"
#include "ambient.h"
#include "rebble_memory.h"
#include "rebbleos.h"
#include "init.h"
#include "rbl_bluetooth.h"
#include "pebble_protocol.h"
#include "stdarg.h"
Expand All @@ -41,6 +42,7 @@
#include "protocol_service.h"
#include "service.h"
#include "rdb.h"
#include <string.h>

/* Stack sizes of the threads */
#define STACK_SZ_CMD configMINIMAL_STACK_SIZE + 600
Expand Down
2 changes: 1 addition & 1 deletion rcore/buttons.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

#include "FreeRTOS.h"
#include "rebbleos.h"
// not ideal. TODO reorg
#include "librebble.h"

#define butDEBOUNCE_DELAY ( pdMS_TO_TICKS(2) )
Expand Down
6 changes: 3 additions & 3 deletions rcore/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
* This must be run in the scheduler, not before.
*
*/
#include "rebbleos.h"
#include "display.h"
#include "init.h"
#include "appmanager.h"

#include "semphr.h"
/* Semaphore to start drawing */
static SemaphoreHandle_t _display_start_sem;
static StaticSemaphore_t _display_start_sem_buf;
Expand Down
5 changes: 3 additions & 2 deletions rcore/flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
*
* Author: Barry Carter <barry.carter@gmail.com>
*/

#include "rebbleos.h"
#include "FreeRTOS.h"
#include "display.h"
#include "platform.h"
#include "semphr.h"
#include "flash.h"
#include "fs.h"

Expand Down
3 changes: 1 addition & 2 deletions rcore/gyro.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
*
* Author: Barry Carter <barry.carter@gmail.com>
*/

#include "rebbleos.h"
#include "display.h"
28 changes: 28 additions & 0 deletions rcore/init.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#pragma once
/* init.h
* routines for [...]
* RebbleOS
*/
//Let's make sure the user is using an 'up to date' version of the compiler


#define VERSION "v0.0.0.2"

#if __GNUC__ < 8
#error It appears you are using a version of arm-none-eabi-gcc that is incompatible with with the RebbleOS project. \
Please find an updated version by using your respective package manager or going to the developer.arm.com download page.
#endif



// Reset the watchdog timer manually
void watchdog_reset(void);


void rebbleos_init(void);
void os_module_init_complete(uint8_t result);

#define INIT_RESP_OK 0
#define INIT_RESP_ASYNC_WAIT 1
#define INIT_RESP_NOT_SUPPORTED 2
#define INIT_RESP_ERROR 3
3 changes: 2 additions & 1 deletion rcore/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* Author: Barry Carter <barry.carter@gmail.com>
*/
#include "main.h"

#include "rebbleos.h"
#include "minilib.h"
#include "rtoswrap.h"

Expand All @@ -23,6 +23,7 @@ static void _log_entry(void *arg) {
}
}
THREAD_DEFINE(log, 300, tskIDLE_PRIORITY + 10UL, _log_entry);
extern int vsfmt(char *buf, unsigned int len, const char *ifmt, va_list ap);

void log_onpanic_dump() {
log_clock_enable();
Expand Down
3 changes: 1 addition & 2 deletions rcore/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
*
* Author: Barry Carter <barry.carter@gmail.com>
*/

#include "rebbleos.h"
#include "main.h"
#include "watchdog.h"
#include "ambient.h"

Expand Down
2 changes: 1 addition & 1 deletion rcore/notification_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* Author: Barry Carter <barry.carter@gmail.com>.
*/
#include "rebbleos.h"
#include "main.h"
#include "protocol_notification.h"
#include "notification_manager.h"
#include "overlay_manager.h"
Expand Down
3 changes: 2 additions & 1 deletion rcore/overlay_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
*
* Author: Barry Carter <barry.carter@gmail.com>.
*/
#include "rebbleos.h"
#include "main.h"
#include "init.h"
#include "ngfxwrap.h"
#include "overlay_manager.h"
#include "protocol.h"
Expand Down
2 changes: 1 addition & 1 deletion rcore/overlay_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* Window creation happens in a callback so we can delegate the work to our thread
* and constrain memory and runtime of the window
*/
#include "rebbleos.h"
#include "overlay_manager.h"

/* NOT USED YET */
typedef enum OverlayMode {
Expand Down
3 changes: 2 additions & 1 deletion rcore/power.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
*
* Author: Barry Carter <barry.carter@gmail.com>
*/
#include "main.h"
#include <stdbool.h>
#include "power.h"
#include "rebbleos.h"
#include "notification_manager.h"
#include "battery_state_service.h"
#include "flash.h"

static uint8_t _charge_mode_prev = 0;
static uint8_t _charge_mode = 0;
Expand Down
2 changes: 1 addition & 1 deletion rcore/protocol/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: Barry Carter <barry.carter@gmail.com>
*/
#include <stdlib.h>
#include "rebbleos.h"
#include "main.h"
#include "endpoint.h"
#include "protocol.h"
#include "pebble_protocol.h"
Expand Down
Loading

0 comments on commit b433244

Please sign in to comment.