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 00025 #ifndef __HAL_RTC_H__ 00026 #define __HAL_RTC_H__ 00027 00028 #include <stdint.h> 00029 #include <stdbool.h> 00030 00034 typedef enum { 00035 HAL_RTC_COMPARE_MODE_DISABLE = 0x00, 00036 HAL_RTC_COMPARE_MODE_1 = 0x02, 00037 HAL_RTC_COMPARE_MODE_0 = 0x03 00038 } hal_rtc_compare_mode_t; 00039 00042 void hal_rtc_capture(void); 00043 00049 void hal_rtc_radio_capture_enable(bool en); 00050 00055 void hal_rtc_set_compare_mode(hal_rtc_compare_mode_t mode); 00056 00062 void hal_rtc_start(bool en); 00063 00069 void hal_rtc_set_compare_value(uint16_t value); 00070 00075 uint16_t hal_rtc_get_compare_value(void); 00076 00081 uint16_t hal_rtc_get_capture_value(void); 00082 00090 uint8_t hal_rtc_get_capture_clock_cycles(void); 00091 00092 #endif // __HAL_RTC_H__ 00093