00001 /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 00002 * 00003 * The information contained herein is confidential property of Nordic 00004 * Semiconductor ASA.Terms and conditions of usage are described in detail 00005 * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 00006 * 00007 * Licensees are granted free, non-transferable use of the information. NO 00008 * WARRENTY of ANY KIND is provided. This heading must NOT be removed from 00009 * the file. 00010 * 00011 * $LastChangedRevision: 133 $ 00012 */ 00013 00018 #include "nrf24lu1p.h" 00019 #include "nordic_common.h" 00020 #include "cpu.h" 00021 00022 void cpu_pwr_down(void) 00023 { 00024 PWRDWN = 1; 00025 } 00026 00027 void cpu_set_clock_frequency(uint8_t cf) 00028 { 00029 uint8_t temp = CLKCTL; 00030 00031 // Clock frequnecy is defined by bits 6-4 in CLKCTL 00032 temp &= ~(BIT_6 | BIT_5 | BIT_4); 00033 temp |= cf & (BIT_6 | BIT_5 | BIT_4); 00034 00035 F0 = EA; 00036 EA = 0; 00037 CLKCTL = temp; 00038 EA = F0; 00039 } 00040