1 #ifndef ATTINY13A_TIMERS_H_ 2 #define ATTINY13A_TIMERS_H_ uint8_t TIMER_getCount(timer_main timerNumber)
Get the current value of a running timer.
mcu_error TIMER_setCount(timer_main timerNumber, uint8_t count)
Set the current value of a running timer.
Header file for attiny13a DEBUG.
Header file for attiny13a CLOCK.
mcu_error TIMER_setupPWM(timer_main timerNumber, timer_channel timerChannel, uint16_t frequency, uint8_t duty)
Initialize given timer for PWM mode.
mcu_error TIMER_resume(timer_main timerNumber)
Resume a paused timer.
Header file for attiny13a GPIO.
mcu_error TIMER_pause(timer_main timerNumber)
Pause an already running timer.
mcu_error TIMER_enableISR(timer_main timerNumber, void(*handler)(void))
Set the ISR target for timeout.
mcu_error TIMER_setPeriod(timer_main timerNumber, uint32_t period)
Set the period for the timer. (in microseconds)
timer_main
Main timers available on the MCU.
mcu_error TIMER_disableISR(timer_main timerNumber)
Disable the timeout IRQ.
mcu_error TIMER_setFrequency(timer_main timerNumber, uint16_t frequency)
Set the frequency for the timer. (in hertz)
timer_channel
Timers channels available for each timer.
mcu_error TIMER_setDuty(timer_main timerNumber, timer_channel channel, uint8_t duty)
Set the duty cycle for the waveform (PWM only, 0 - 100%).
mcu_error TIMER_setupPulse(timer_main timerNumber, timer_channel timerChannel, uint16_t frequency, uint16_t pulse)
Initialize given timer for Pulse mode.
mcu_error TIMER_setupIC(timer_main timerNumber, timer_channel timerChannel)
Initialize given timer for input capture.
mcu_error TIMER_setPulse(timer_main timerNumber, timer_channel channel, uint16_t pulse)
Set the pulse width for the output. (in milliseconds)
mcu_error TIMER_setupCount(timer_main timerNumber, uint16_t frequency, void(*handler)(void))
Initialize given timer for standard count with interrupt trigging the function handler on timeout...
mcu_error
Error enumerators for the Debug peripheral.
uint16_t TIMER_getIC(timer_main timerNumber, timer_channel channel)
Get the last input capture time from a channel of a timer.