blob: 0185a9e22c5d23fdfdaa91f19d48a0cafb0377bf [file] [log] [blame]
Damien George075d5972014-11-27 20:30:33 +00001#ifndef _INCLUDED_ETSHAL_H_
2#define _INCLUDED_ETSHAL_H_
3
Paul Sokolovskyf22a4f82016-03-04 19:39:24 +02004#include <os_type.h>
5
Damien George6ca17c12016-03-29 10:29:57 +03006// see http://esp8266-re.foogod.com/wiki/Random_Number_Generator
7#define WDEV_HWRNG ((volatile uint32_t*)0x3ff20e44)
8
Damien George07744832016-03-01 09:20:22 +00009void ets_delay_us();
10void ets_intr_lock(void);
11void ets_intr_unlock(void);
12void ets_isr_mask(uint32_t mask);
13void ets_isr_unmask(uint32_t mask);
14void ets_isr_attach(int irq_no, void (*handler)(void *), void *arg);
Damien George075d5972014-11-27 20:30:33 +000015void ets_install_putc1();
Damien George075d5972014-11-27 20:30:33 +000016void uart_div_modify();
Damien George07744832016-03-01 09:20:22 +000017void ets_set_idle_cb(void (*handler)(void *), void *arg);
Damien George075d5972014-11-27 20:30:33 +000018
Paul Sokolovskyf22a4f82016-03-04 19:39:24 +020019void ets_timer_arm_new(os_timer_t *tim, uint32_t millis, bool repeat, bool is_milli_timer);
20void ets_timer_setfn(os_timer_t *tim, ETSTimerFunc callback, void *cb_data);
21void ets_timer_disarm(os_timer_t *tim);
22
Paul Sokolovsky76c81cd2016-05-03 00:35:11 +030023// These prototypes are for recent SDKs with "malloc tracking"
24void *pvPortMalloc(unsigned sz, const char *fname, int line);
25void vPortFree(void *p, const char *fname, int line);
26
Damien George075d5972014-11-27 20:30:33 +000027#endif // _INCLUDED_ETSHAL_H_