Merge pull request #8360 from neiljay/pr/correct_usage_of_features_on_mips
mips: Correct usage of USEMODULE
This commit is contained in:
commit
469a1bb632
@ -13,6 +13,7 @@
|
||||
#include "periph/uart.h"
|
||||
#include "bitarithm.h"
|
||||
#include "board.h"
|
||||
#include "cpu.h"
|
||||
|
||||
extern void dummy(void);
|
||||
|
||||
@ -36,6 +37,9 @@ void board_init(void)
|
||||
LED1_OFF;
|
||||
LED2_OFF;
|
||||
|
||||
/* initialize the CPU */
|
||||
cpu_init();
|
||||
|
||||
/* Stop the linker from throwing away the PIC32 config register settings */
|
||||
dummy();
|
||||
}
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
#include "periph/uart.h"
|
||||
#include "bitarithm.h"
|
||||
#include "board.h"
|
||||
#include "cpu.h"
|
||||
|
||||
extern void dummy(void);
|
||||
|
||||
@ -32,8 +33,6 @@ void board_init(void)
|
||||
uart_init(DEBUG_VIA_UART, DEBUG_UART_BAUD, NULL, 0);
|
||||
#endif
|
||||
|
||||
hwrng_init();
|
||||
|
||||
/* Turn off all LED's */
|
||||
gpio_init(LED1_PIN, GPIO_OUT);
|
||||
gpio_init(LED2_PIN, GPIO_OUT);
|
||||
@ -44,6 +43,9 @@ void board_init(void)
|
||||
LED3_OFF;
|
||||
LED4_OFF;
|
||||
|
||||
/* initialize the CPU */
|
||||
cpu_init();
|
||||
|
||||
/* Stop the linker from throwing away the PIC32 config register settings */
|
||||
dummy();
|
||||
}
|
||||
|
||||
@ -15,11 +15,13 @@
|
||||
|
||||
#include "periph/uart.h"
|
||||
#include "periph/timer.h"
|
||||
#include "periph/init.h"
|
||||
#include "panic.h"
|
||||
#include "kernel_init.h"
|
||||
#include "cpu.h"
|
||||
#include "board.h"
|
||||
|
||||
|
||||
void mips_start(void);
|
||||
|
||||
extern void _fini(void);
|
||||
@ -71,3 +73,9 @@ void panic_arch(void)
|
||||
while (1) {
|
||||
}
|
||||
}
|
||||
|
||||
void cpu_init(void)
|
||||
{
|
||||
/* trigger static peripheral initialization */
|
||||
periph_init();
|
||||
}
|
||||
|
||||
@ -6,4 +6,3 @@ USEMODULE += mips_pic32_common
|
||||
USEMODULE += mips_pic32_common_periph
|
||||
|
||||
USEMODULE += periph_common
|
||||
USEMODULE += periph_hwrng
|
||||
|
||||
@ -47,6 +47,11 @@ static inline void cpu_print_last_instruction(void)
|
||||
/* This function must exist else RIOT won't compile */
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Initialize the CPU, set IRQ priorities
|
||||
*/
|
||||
void cpu_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -47,6 +47,11 @@ static inline void cpu_print_last_instruction(void)
|
||||
/* This function must exist else RIOT won't compile */
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Initialize the CPU, set IRQ priorities
|
||||
*/
|
||||
void cpu_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user