Hello Guyz,
I've found below code that belongs to the timer declaration function but the definition is hidden by the author.
Can anyone help me to provide a definition for the same?
I want this to be utilized in a project related to ATMEGA8 using Atmel studio.
#ifndef TIMERS_H_
#define TIMERS_H_
#include <inttypes.h>
typedef struct timer_st_
{
volatile uint8_t expiry_flag:1;
volatile uint8_t enabled_flag:1;
uint16_t ticks_elapsed;
uint16_t ticks_total;
}timer_st;
void
reset_timer (timer_st *timer);
void
start_timer (timer_st *timer, uint16_t ticks);
void
stop_timer (timer_st *timer);
uint8_t
is_timer_expired (timer_st *timer);
uint8_t
is_timer_enabled (timer_st *timer);
void
process_timer (timer_st *timer);
I've found below code that belongs to the timer declaration function but the definition is hidden by the author.
Can anyone help me to provide a definition for the same?
I want this to be utilized in a project related to ATMEGA8 using Atmel studio.
#ifndef TIMERS_H_
#define TIMERS_H_
#include <inttypes.h>
typedef struct timer_st_
{
volatile uint8_t expiry_flag:1;
volatile uint8_t enabled_flag:1;
uint16_t ticks_elapsed;
uint16_t ticks_total;
}timer_st;
void
reset_timer (timer_st *timer);
void
start_timer (timer_st *timer, uint16_t ticks);
void
stop_timer (timer_st *timer);
uint8_t
is_timer_expired (timer_st *timer);
uint8_t
is_timer_enabled (timer_st *timer);
void
process_timer (timer_st *timer);