2014-11-27 20:30:33 +00:00
|
|
|
#ifndef _INCLUDED_ETSHAL_H_
|
|
|
|
#define _INCLUDED_ETSHAL_H_
|
|
|
|
|
2016-03-04 17:39:24 +00:00
|
|
|
#include <os_type.h>
|
|
|
|
|
2016-03-29 08:29:57 +01:00
|
|
|
// see http://esp8266-re.foogod.com/wiki/Random_Number_Generator
|
|
|
|
#define WDEV_HWRNG ((volatile uint32_t*)0x3ff20e44)
|
|
|
|
|
2016-03-01 09:20:22 +00:00
|
|
|
void ets_delay_us();
|
|
|
|
void ets_intr_lock(void);
|
|
|
|
void ets_intr_unlock(void);
|
|
|
|
void ets_isr_mask(uint32_t mask);
|
|
|
|
void ets_isr_unmask(uint32_t mask);
|
|
|
|
void ets_isr_attach(int irq_no, void (*handler)(void *), void *arg);
|
2014-11-27 20:30:33 +00:00
|
|
|
void ets_install_putc1();
|
|
|
|
void uart_div_modify();
|
2016-03-01 09:20:22 +00:00
|
|
|
void ets_set_idle_cb(void (*handler)(void *), void *arg);
|
2014-11-27 20:30:33 +00:00
|
|
|
|
2016-03-04 17:39:24 +00:00
|
|
|
void ets_timer_arm_new(os_timer_t *tim, uint32_t millis, bool repeat, bool is_milli_timer);
|
|
|
|
void ets_timer_setfn(os_timer_t *tim, ETSTimerFunc callback, void *cb_data);
|
|
|
|
void ets_timer_disarm(os_timer_t *tim);
|
|
|
|
|
2016-09-03 18:45:11 +01:00
|
|
|
extern void ets_wdt_disable(void);
|
|
|
|
extern void wdt_feed(void);
|
|
|
|
|
2016-08-03 22:29:19 +01:00
|
|
|
// Opaque structure
|
2016-11-01 22:47:03 +00:00
|
|
|
#ifndef MD5_CTX
|
|
|
|
typedef char MD5_CTX[88];
|
|
|
|
#endif
|
2016-08-03 22:29:19 +01:00
|
|
|
|
|
|
|
void MD5Init(MD5_CTX *context);
|
|
|
|
void MD5Update(MD5_CTX *context, const void *data, unsigned int len);
|
|
|
|
void MD5Final(unsigned char digest[16], MD5_CTX *context);
|
|
|
|
|
2016-05-02 22:35:11 +01:00
|
|
|
// These prototypes are for recent SDKs with "malloc tracking"
|
|
|
|
void *pvPortMalloc(unsigned sz, const char *fname, int line);
|
2016-10-23 14:43:07 +01:00
|
|
|
void *pvPortZalloc(unsigned sz, const char *fname, int line);
|
|
|
|
void *pvPortRealloc(void *p, unsigned sz, const char *fname, int line);
|
2016-05-02 22:35:11 +01:00
|
|
|
void vPortFree(void *p, const char *fname, int line);
|
|
|
|
|
2016-11-01 22:41:51 +00:00
|
|
|
uint32_t SPIRead(uint32_t offset, void *buf, uint32_t len);
|
|
|
|
uint32_t SPIWrite(uint32_t offset, const void *buf, uint32_t len);
|
|
|
|
uint32_t SPIEraseSector(int sector);
|
|
|
|
|
2014-11-27 20:30:33 +00:00
|
|
|
#endif // _INCLUDED_ETSHAL_H_
|