#include "seagull.h"
#define CPUCLK_DIV0  3
#define CPUCLK_DIV2  2
#define CPUCLK_DIV4  1
#define CPUCLK_DIV12 0

#define SUBCLK 1
#define IHRC   0

#define ILRC 2
#define XTAL 3

#define CLKO_CPU         0
#define CLKO_IHRC        1
#define CLKO_ILRC        2
#define CLKO_PERI        3
#define CLKO_XTAL        4
#define CLKO_FREE_CLK    5
#define CLKO_SYSTEM_CLK  6

void system_clk_div(uint8_t clk_div);
void clk_enable(uint8_t clk_source);
void clk_disable(uint8_t clk_source);
void main_clk_sel(uint8_t clk_source);
void sub_clk_sel(uint8_t subclk_source);
void cpu_idle(void);
void cpu_stop(void);
void clko_output(uint8_t clko_sel);