dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pios_board.c
Go to the documentation of this file.
1 
13 #include "board_hw_defs.c"
14 
15 #include <pios.h>
16 
22 #include <pios_board_info.h>
23 
24 void PIOS_Board_Init(void) {
25  /* Delay system */
27 
28  const struct pios_board_info * bdinfo = &pios_board_info_blob;
29 
30  const struct pios_annunc_cfg * led_cfg = PIOS_BOARD_HW_DEFS_GetLedCfg(bdinfo->board_rev);
31  PIOS_Assert(led_cfg);
32  PIOS_ANNUNC_Init(led_cfg);
33 
34  /* Inititialize all flash drivers */
35  PIOS_Flash_Internal_Init(&pios_internal_flash_id, &flash_internal_cfg);
36 
37  /* Register the partition table */
38  const struct pios_flash_partition * flash_partition_table;
39  uint32_t num_partitions;
40  flash_partition_table = PIOS_BOARD_HW_DEFS_GetPartitionTable(bdinfo->board_rev, &num_partitions);
41  PIOS_FLASH_register_partition_table(flash_partition_table, num_partitions);
42 }
43 
int32_t PIOS_Flash_Internal_Init(uintptr_t *flash_id, const struct pios_flash_internal_cfg *cfg)
Main PiOS header to include all the compiled in PiOS options.
int32_t PIOS_DELAY_Init(void)
Definition: pios_delay.c:98
const struct pios_board_info pios_board_info_blob
void PIOS_Board_Init()
Definition: pios_board.c:44
int32_t PIOS_ANNUNC_Init(const struct pios_annunc_cfg *cfg)
void PIOS_FLASH_register_partition_table(const struct pios_flash_partition partition_table[], uint8_t num_partitions)
#define PIOS_Assert(test)
Definition: pios_debug.h:52