25#define get_master_clock_frequency() (MAIN_Fosc)
34#define get_master_clock_frequency_high_part() (MAIN_FoscH)
43#define get_master_clock_frequency_low_part() (MAIN_FoscL)
54#define get_frequency_divider() (1 << (CLK_DIV & 0x07))
65#define get_frequency_divider_scale() (CLK_DIV & 0x07)
79#define set_frequency_divider_scale(divider_scale) \
82 CLK_DIV |= (divider_scale & 0x07); \
93#define enable_master_clock_output_div1() (CLK_DIV |= 0x40)
103#define enable_master_clock_output_div2() (CLK_DIV |= 0x80)
113#define enable_master_clock_output_div4() (CLK_DIV |= 0xC0)
124#define disable_master_clock_output() (CLK_DIV &= 0x3f)
148#define get_master_clock_output_pin() ((CLK_DIV & 0xC0) == 0 ? NONE : (CLK_DIV & 0x08) == 0 ? P5_4 : P1_6)
158#pragma disable_warning 126
159#define set_master_clock_output_pin(pin) { \
162 disable_master_clock_output(); \
164 else if (pin == P5_4) \
166 bit_clr(CLK_DIV, CBIT3); \
168 else if (pin == P1_6) \
170 bit_set(CLK_DIV, SBIT3); \
master_clock_output_pin_t
Master clock output pins enumeration.
Definition: frequency.h:132
@ P1_6
output to pin 1.6
Definition: frequency.h:138
@ P5_4
output to pin 5.4
Definition: frequency.h:136
@ NONE
output disabled
Definition: frequency.h:134