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