mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-05-28 20:41:33 +00:00
Added C interface to timer handling.
This commit is contained in:
parent
3c9ab2eb5f
commit
c6efcebf97
14
inc/ip65.h
14
inc/ip65.h
|
@ -178,6 +178,20 @@ unsigned char __fastcall__ udp_send(const unsigned char* buf, unsigned int len,
|
|||
unsigned long dest, unsigned int dest_port,
|
||||
unsigned int src_port);
|
||||
|
||||
// Get number of milliseconds since initialization
|
||||
//
|
||||
// Inputs: None
|
||||
// Output: Current number of milliseconds
|
||||
//
|
||||
unsigned int timer_read(void);
|
||||
|
||||
// Check if specified period of time has passed yet
|
||||
//
|
||||
// Inputs: time: Number of milliseconds we are willing to wait for
|
||||
// Output: 1 if timeout occured, 0 otherwise
|
||||
//
|
||||
unsigned char __fastcall__ timer_timeout(unsigned int time);
|
||||
|
||||
// User abort control
|
||||
//
|
||||
// Control if the user can abort blocking functions with the abort key
|
||||
|
|
|
@ -30,6 +30,7 @@ IP65OBJS=\
|
|||
ip65_c.o \
|
||||
tftp.o \
|
||||
timer.o \
|
||||
timer_c.o \
|
||||
output_buffer.o \
|
||||
parser.o \
|
||||
sntp.o \
|
||||
|
|
17
ip65/timer_c.s
Normal file
17
ip65/timer_c.s
Normal file
|
@ -0,0 +1,17 @@
|
|||
.include "../inc/common.i"
|
||||
|
||||
.export _timer_read
|
||||
.export _timer_timeout
|
||||
|
||||
.import timer_read
|
||||
.import timer_timeout
|
||||
|
||||
_timer_read := timer_read
|
||||
|
||||
_timer_timeout:
|
||||
jsr timer_timeout
|
||||
ldx #$00
|
||||
txa
|
||||
rol
|
||||
eor #$01
|
||||
rts
|
Loading…
Reference in New Issue
Block a user