Macros | |
#define | TC3_WAIT_BUSY() while(REG_TC3_STATUS & TC_STATUS_SYNCBUSY) |
#define | TIMER TC3 |
#define | TIMER_PERIOD UINT16_MAX |
Functions | |
void | _TC3_Handler (void) |
[module_inst] More... | |
void | clock_adjust_ticks (clock_time_t howmany) |
Adjust the system current clock time. More... | |
void | clock_init (void) |
Initialize the clock library. More... | |
static void | clock_irq_callback (struct tc_module *const module_inst) |
unsigned long | clock_seconds (void) |
Get the current value of the platform seconds. More... | |
clock_time_t | clock_time (void) |
Get the current clock time. More... | |
void | configure_tc3 (void) |
static void | configure_tc3_callbacks (void) |
Variables | |
static volatile uint32_t | seconds |
long | sleepseconds |
struct tc_module | tc3_instance |
[module_inst] More... | |
static struct tc_module | tc_instance |
static volatile uint32_t | ticks |
Copyright (c) 2015 Microchip Technology Inc and 2012 – 2013, Thingsquare, http://www.thingsquare.com/. More... | |
#define TC3_WAIT_BUSY | ( | ) | while(REG_TC3_STATUS & TC_STATUS_SYNCBUSY) |
Referenced by configure_tc3().
#define TIMER TC3 |
Referenced by clock_init().
#define TIMER_PERIOD UINT16_MAX |
Referenced by clock_init().
void _TC3_Handler | ( | void | ) |
[module_inst]
References CLOCK_SECOND, energest_flush(), ENERGEST_OFF, ENERGEST_ON, ENERGEST_TYPE_IRQ, etimer_pending(), etimer_request_poll(), seconds, and ticks.
Referenced by configure_tc3_callbacks().
void clock_adjust_ticks | ( | clock_time_t | howmany | ) |
Adjust the system current clock time.
dt | How many ticks to add |
Typically used to add ticks after an MCU sleep clock_seconds will increment if necessary to reflect the tick addition. Leap ticks or seconds can (rarely) be introduced if the ISR is not blocked.
References CLOCK_SECOND, seconds, sleepseconds, and ticks.
Referenced by rtimer_adjust_ticks().
|
static |
References CLOCK_SECOND, etimer_pending(), etimer_request_poll(), seconds, and ticks.
Referenced by clock_init().
void configure_tc3 | ( | void | ) |
[setup_config]
[setup_config] [setup_config_defaults]
[setup_config_defaults]
[setup_change_config]
[setup_change_config]
[setup_change_config_pwm]
[setup_change_config_pwm]
[setup_set_config]
[setup_set_config]
[setup_enable]
[setup_enable]
References tc_16bit_config::compare_capture_channel, configure_tc3_callbacks(), tc_config::counter_16_bit, tc_config::counter_size, tc3_instance, TC3_WAIT_BUSY, TC_COUNTER_SIZE_16BIT, tc_enable(), tc_get_config_defaults(), tc_init(), TC_WAVE_GENERATION_NORMAL_PWM, and tc_config::wave_generation.
Referenced by main().
|
static |
[setup_register_callback]
[setup_register_callback]
[setup_enable_callback]
[setup_enable_callback]
References _TC3_Handler(), tc3_instance, TC_CALLBACK_CC_CHANNEL0, tc_enable_callback(), and tc_register_callback().
Referenced by configure_tc3().
|
static |
Referenced by _TC3_Handler(), clock_adjust_ticks(), clock_irq_callback(), clock_seconds(), and network_reboot_reboot().
long sleepseconds |
Referenced by clock_adjust_ticks().
struct tc_module tc3_instance |
[module_inst]
Referenced by configure_tc3(), and configure_tc3_callbacks().
|
static |
|
static |
Copyright (c) 2015 Microchip Technology Inc and 2012 – 2013, Thingsquare, http://www.thingsquare.com/.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Referenced by _TC3_Handler(), clock_adjust_ticks(), clock_irq_callback(), clock_time(), new_dio_interval(), rtimer_adjust_ticks(), and while().