23 lines
418 B
C
23 lines
418 B
C
#include "BA45F5250.h"
|
|
#include "stdint.h"
|
|
#include "build-in.h"
|
|
#include "osc_configuration.h"
|
|
#include "macro_define.h"
|
|
|
|
void osc_init()
|
|
{
|
|
// Control system clock
|
|
_scc = 0b00000000;
|
|
|
|
// Control HIRC clock
|
|
#if _HIRCC_8M
|
|
_hircc = 0b00001001;
|
|
#elif _HIRCC_4M
|
|
_hircc = 0b00000101;
|
|
#else
|
|
_hircc = 0b00000001;
|
|
#endif
|
|
|
|
// Control watchdog timer
|
|
_wdtc = 0b01010111;
|
|
} |