blob: b7e23e8309bdbbb420a8b9cd4dcd6530d3ce63c1 [file] [log] [blame]
Alexander Steffen299bc622017-06-29 23:14:58 +02001#ifndef MICROPY_INCLUDED_ESP8266_ETSHAL_H
2#define MICROPY_INCLUDED_ESP8266_ETSHAL_H
Damien George075d5972014-11-27 20:30:33 +00003
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
Damien George69661f32020-02-27 15:36:53 +11007#define WDEV_HWRNG ((volatile uint32_t *)0x3ff20e44)
Damien George6ca17c12016-03-29 10:29:57 +03008
Damien George07744832016-03-01 09:20:22 +00009void ets_isr_mask(uint32_t mask);
10void ets_isr_unmask(uint32_t mask);
Damien George075d5972014-11-27 20:30:33 +000011
Paul Sokolovskye33d2382016-08-04 00:29:19 +030012// Opaque structure
Paul Sokolovsky5fae9142016-11-02 01:47:03 +030013#ifndef MD5_CTX
14typedef char MD5_CTX[88];
15#endif
Paul Sokolovskye33d2382016-08-04 00:29:19 +030016
17void MD5Init(MD5_CTX *context);
18void MD5Update(MD5_CTX *context, const void *data, unsigned int len);
19void MD5Final(unsigned char digest[16], MD5_CTX *context);
20
Paul Sokolovsky2ec70dc2016-11-02 01:41:51 +030021uint32_t SPIRead(uint32_t offset, void *buf, uint32_t len);
22uint32_t SPIWrite(uint32_t offset, const void *buf, uint32_t len);
23uint32_t SPIEraseSector(int sector);
24
Alexander Steffen299bc622017-06-29 23:14:58 +020025#endif // MICROPY_INCLUDED_ESP8266_ETSHAL_H