armcm_reset: Add a armcm_reset.h header file for try_request_canboot()

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2022-06-04 11:50:57 -04:00
parent 9047702a00
commit c1f4bdebf2
9 changed files with 18 additions and 9 deletions

View File

@ -4,10 +4,11 @@
// //
// This file may be distributed under the terms of the GNU GPLv3 license. // This file may be distributed under the terms of the GNU GPLv3 license.
#include "armcm_reset.h" // try_request_canboot
#include "autoconf.h" // CONFIG_FLASH_START
#include "board/internal.h" // NVIC_SystemReset #include "board/internal.h" // NVIC_SystemReset
#include "board/irq.h" // irq_disable
#include "command.h" // DECL_COMMAND_FLAGS #include "command.h" // DECL_COMMAND_FLAGS
#include "autoconf.h" // CONFIG_FLASH_START
#include "irq.h" // irq_disable
#define CANBOOT_SIGNATURE 0x21746f6f426e6143 #define CANBOOT_SIGNATURE 0x21746f6f426e6143
#define CANBOOT_REQUEST 0x5984E3FA6CA1589B #define CANBOOT_REQUEST 0x5984E3FA6CA1589B

View File

@ -0,0 +1,6 @@
#ifndef __GENERIC_ARMCM_RESET_H
#define __GENERIC_ARMCM_RESET_H
void try_request_canboot(void);
#endif // armcm_reset.h

View File

@ -7,12 +7,12 @@
// This file may be distributed under the terms of the GNU GPLv3 license. // This file may be distributed under the terms of the GNU GPLv3 license.
#include <string.h> // memcpy #include <string.h> // memcpy
#include "board/armcm_reset.h" // try_request_canboot
#include "board/io.h" // readb
#include "board/irq.h" // irq_save
#include "board/misc.h" // console_sendf
#include "canbus.h" // canbus_set_uuid #include "canbus.h" // canbus_set_uuid
#include "command.h" // DECL_CONSTANT #include "command.h" // DECL_CONSTANT
#include "generic/io.h" // readb
#include "generic/irq.h" // irq_disable
#include "generic/misc.h" // console_sendf
#include "board/internal.h" // NVIC_SystemReset
#include "sched.h" // sched_wake_task #include "sched.h" // sched_wake_task
static uint32_t canbus_assigned_id; static uint32_t canbus_assigned_id;

View File

@ -42,7 +42,4 @@ struct cline lookup_clock_line(uint32_t periph_base);
uint32_t get_pclock_frequency(uint32_t periph_base); uint32_t get_pclock_frequency(uint32_t periph_base);
void gpio_clock_enable(GPIO_TypeDef *regs); void gpio_clock_enable(GPIO_TypeDef *regs);
// armcm_timer.c
void try_request_canboot(void);
#endif // internal.h #endif // internal.h

View File

@ -6,6 +6,7 @@
#include "autoconf.h" // CONFIG_CLOCK_REF_FREQ #include "autoconf.h" // CONFIG_CLOCK_REF_FREQ
#include "board/armcm_boot.h" // armcm_main #include "board/armcm_boot.h" // armcm_main
#include "board/armcm_reset.h" // try_request_canboot
#include "board/irq.h" // irq_disable #include "board/irq.h" // irq_disable
#include "command.h" // DECL_CONSTANT_STR #include "command.h" // DECL_CONSTANT_STR
#include "internal.h" // enable_pclock #include "internal.h" // enable_pclock

View File

@ -6,6 +6,7 @@
#include "autoconf.h" // CONFIG_CLOCK_REF_FREQ #include "autoconf.h" // CONFIG_CLOCK_REF_FREQ
#include "board/armcm_boot.h" // VectorTable #include "board/armcm_boot.h" // VectorTable
#include "board/armcm_reset.h" // try_request_canboot
#include "board/irq.h" // irq_disable #include "board/irq.h" // irq_disable
#include "board/usb_cdc.h" // usb_request_bootloader #include "board/usb_cdc.h" // usb_request_bootloader
#include "internal.h" // enable_pclock #include "internal.h" // enable_pclock

View File

@ -6,6 +6,7 @@
#include "autoconf.h" // CONFIG_CLOCK_REF_FREQ #include "autoconf.h" // CONFIG_CLOCK_REF_FREQ
#include "board/armcm_boot.h" // VectorTable #include "board/armcm_boot.h" // VectorTable
#include "board/armcm_reset.h" // try_request_canboot
#include "board/irq.h" // irq_disable #include "board/irq.h" // irq_disable
#include "board/usb_cdc.h" // usb_request_bootloader #include "board/usb_cdc.h" // usb_request_bootloader
#include "command.h" // DECL_CONSTANT_STR #include "command.h" // DECL_CONSTANT_STR

View File

@ -6,6 +6,7 @@
#include "autoconf.h" // CONFIG_CLOCK_REF_FREQ #include "autoconf.h" // CONFIG_CLOCK_REF_FREQ
#include "board/armcm_boot.h" // armcm_main #include "board/armcm_boot.h" // armcm_main
#include "board/armcm_reset.h" // try_request_canboot
#include "board/irq.h" // irq_disable #include "board/irq.h" // irq_disable
#include "command.h" // DECL_CONSTANT_STR #include "command.h" // DECL_CONSTANT_STR
#include "internal.h" // enable_pclock #include "internal.h" // enable_pclock

View File

@ -6,6 +6,7 @@
#include "autoconf.h" // CONFIG_CLOCK_REF_FREQ #include "autoconf.h" // CONFIG_CLOCK_REF_FREQ
#include "board/armcm_boot.h" // VectorTable #include "board/armcm_boot.h" // VectorTable
#include "board/armcm_reset.h" // try_request_canboot
#include "command.h" // DECL_CONSTANT_STR #include "command.h" // DECL_CONSTANT_STR
#include "internal.h" // get_pclock_frequency #include "internal.h" // get_pclock_frequency
#include "sched.h" // sched_main #include "sched.h" // sched_main