blob: dd61ddec936c13fcca547c17227f41cd9a08ac98 [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 Sokolovskye33d2382016-08-04 00:29:19 +030023// Opaque structure
24typedef char MD5_CTX[64];
25
26void MD5Init(MD5_CTX *context);
27void MD5Update(MD5_CTX *context, const void *data, unsigned int len);
28void MD5Final(unsigned char digest[16], MD5_CTX *context);
29
Paul Sokolovsky76c81cd2016-05-03 00:35:11 +030030// These prototypes are for recent SDKs with "malloc tracking"
31void *pvPortMalloc(unsigned sz, const char *fname, int line);
32void vPortFree(void *p, const char *fname, int line);
33
Damien George075d5972014-11-27 20:30:33 +000034#endif // _INCLUDED_ETSHAL_H_