Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Smith committed Jul 23, 2024
1 parent b59ade0 commit 3839aa1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ bool http_open_channel(void) {
.notification_handle = http_handles.notification,
.notification_tag = USER_TAG_HTTP_OPEN_CHANNEL,
.network_handle = http_handles.network,
.receive_buffer = (uint8_t*)http_rx_buffer,
.receive_buffer = http_rx_buffer,
.receive_buffer_len = sizeof(http_rx_buffer),
.send_buffer = (uint8_t*)http_tx_buffer,
.send_buffer = http_tx_buffer,
.send_buffer_len = sizeof(http_tx_buffer),
.channel_type = MV_CHANNELTYPE_HTTP,
.endpoint = {
Expand Down
2 changes: 1 addition & 1 deletion app/logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ static void post_log(bool is_err, const char* format_string, va_list args);
* GLOBALS
*/
// Entities for Microvisor application logging
static uint8_t log_buffer[LOG_BUFFER_SIZE_B] __attribute__((aligned(512))) = {0};
static uint8_t log_buffer[LOG_BUFFER_SIZE_B] __attribute__((aligned(512))) = {0};
static uint32_t log_state = USER_HANDLE_LOGGING_OFF;

// Entities for local serial logging
Expand Down
6 changes: 4 additions & 2 deletions app/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ int main(void) {

// Initialize peripherals
gpio_init();
control_system_led(true);

// Get the Device ID and build number
log_device_info();
Expand Down Expand Up @@ -152,9 +153,10 @@ static void start_app(void) {
static void task_led(void* argument) {

uint32_t last_tick = 0;
osTimerId_t polite_timer;
osTimerId_t polite_timer = NULL;

// FROM 3.3.0
// Set a timer to turn off the System LED approx. 60s after boot
osTimerId_t sys_led_timer = osTimerNew(do_clear_led, osTimerOnce, NULL, NULL);
if (sys_led_timer != NULL) osTimerStart(sys_led_timer, 59 * 1000);

Expand Down Expand Up @@ -349,7 +351,7 @@ static void setup_sys_notification_center(void) {
// Configure a notification center for system notifications
static struct MvNotificationSetup sys_notification_setup = {
.irq = TIM1_BRK_IRQn,
.buffer = (struct MvNotification*)sys_notification_center,
.buffer = sys_notification_center,
.buffer_size = sizeof(sys_notification_center)
};

Expand Down
2 changes: 1 addition & 1 deletion app/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#define CHANNEL_KILL_PERIOD_MS 15000
#define SYS_LED_DISABLE_MS 58000

#define MAX_HEADERS_OUTPUT 24
#define MAX_HEADERS_OUTPUT 16


#endif // _MAIN_H_
2 changes: 1 addition & 1 deletion app/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static struct {

// Central store for network management notification records.
// Holds 'NET_NC_BUFFER_SIZE_R' records at a time -- each record is 16 bytes in size.
static struct MvNotification net_notification_buffer[NET_NC_BUFFER_SIZE_R] __attribute__((aligned(8)));
static struct MvNotification net_notification_buffer[NET_NC_BUFFER_SIZE_R] __attribute__((aligned(8)));


/**
Expand Down

0 comments on commit 3839aa1

Please sign in to comment.