blob: 4c0d551da67693e5239c807ce6dc1e797311b542 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#include <stdlib.h>
#include <stdio.h>
#include "eos.h"
#include "eve.h"
#include "eve_platform.h"
void *eve_malloc(size_t size) {
void *p = malloc(size);
printf("MALLOC:%p %d\n", p, size);
return p;
}
void eve_free(void *p) {
printf("FREE:%p\n", p);
free(p);
}
void eve_sleep(uint32_t ms) {
eos_time_sleep(ms);
}
uint32_t eve_get_tick(void) {
return eos_time_get_tick();
}
void eve_sys_timer_set(uint32_t ms) {
eos_timer_set(EOS_TIMER_ETYPE_UI, ms);
}
void eve_sys_timer_clear(void) {
eos_timer_clear(EOS_TIMER_ETYPE_UI);
}
void eve_select(void) {
eos_spi_select(EOS_SPI_DEV_EVE);
}
void eve_deselect(void) {
eos_spi_deselect();
}
int eve_selected(void) {
return (eos_spi_dev() == EOS_SPI_DEV_EVE);
}
|