vectorscope / clock.h

/** \file
 * Realtime clock tracking.
 *
 * Uses Timer0 overflow to generate ms level clock ticks.
 */

#ifndef _clock_h_
#define _clock_h_

#include <avr/io.h>
#include <stdint.h>

/** Track the number of miliseconds, sec, min and hour since midnight */
extern volatile uint8_t now_hour;
extern volatile uint8_t now_min;
extern volatile uint8_t now_sec;
extern volatile uint16_t now_ms;
extern volatile uint16_t now; // ms since boot


void
clock_init(void);


#endif
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.