Skip to content

Commit a1aa4c1

Browse files
ficetoficeto
ficeto
authored and
ficeto
committed
adding some missing libs and definitions
included also a dump of the known registers range
1 parent 236d967 commit a1aa4c1

File tree

11 files changed

+1696
-91
lines changed

11 files changed

+1696
-91
lines changed

docs/rgisters_dump.txt

+1,157
Large diffs are not rendered by default.

hardware/tools/esp8266/sdk/include/c_types.h

+12
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,17 @@
99
#include <stdbool.h>
1010
#include <stdarg.h>
1111

12+
typedef unsigned char uint8_t;
1213
typedef signed char sint8_t;
14+
typedef signed char int8_t;
15+
typedef unsigned short uint16_t;
1316
typedef signed short sint16_t;
17+
typedef signed short int16_t;
18+
typedef unsigned long uint32_t;
1419
typedef signed long sint32_t;
20+
typedef signed long int32_t;
1521
typedef signed long long sint64_t;
22+
typedef unsigned long long uint64_t;
1623
typedef unsigned long long u_int64_t;
1724
typedef float real32_t;
1825
typedef double real64_t;
@@ -40,6 +47,8 @@ typedef double real64;
4047

4148
#define __le16 u16
4249

50+
typedef unsigned int size_t;
51+
4352
#define __packed __attribute__((packed))
4453

4554
#define LOCAL static
@@ -76,7 +85,10 @@ typedef enum {
7685
#endif /* ICACHE_FLASH */
7786

7887
#ifndef __cplusplus
88+
typedef unsigned char bool;
7989
#define BOOL bool
90+
#define true (1)
91+
#define false (0)
8092
#define TRUE true
8193
#define FALSE false
8294

hardware/tools/esp8266/sdk/include/espconn.h

+107-91
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ struct mdns_info {
128128
unsigned long ipAddr;
129129
char *txt_data;
130130
};
131+
131132
/******************************************************************************
132133
* FunctionName : espconn_connect
133134
* Description : The function given as the connect
@@ -173,6 +174,19 @@ sint8 espconn_accept(struct espconn *espconn);
173174

174175
sint8 espconn_create(struct espconn *espconn);
175176

177+
/******************************************************************************
178+
* FunctionName : espconn_sent
179+
* Description : sent data for client or server
180+
* Parameters : espconn -- espconn to set for client or server
181+
* psent -- data to send
182+
* length -- length of data to send
183+
* Returns : none
184+
*******************************************************************************/
185+
186+
sint8 espconn_sent(struct espconn *espconn, uint8 *psent, uint16 length);
187+
188+
/***** Connetion Settings *******/
189+
176190
/******************************************************************************
177191
* FunctionName : espconn_tcp_get_max_con
178192
* Description : get the number of simulatenously active TCP connections
@@ -204,7 +218,7 @@ sint8 espconn_tcp_get_max_con_allow(struct espconn *espconn);
204218
* FunctionName : espconn_tcp_set_max_con_allow
205219
* Description : set the count of simulatenously active connections on the server
206220
* Parameters : espconn -- espconn to set the count
207-
* num -- support the connection number
221+
* num -- support the connection number
208222
* Returns : result
209223
*******************************************************************************/
210224

@@ -214,7 +228,7 @@ sint8 espconn_tcp_set_max_con_allow(struct espconn *espconn, uint8 num);
214228
* FunctionName : espconn_regist_time
215229
* Description : used to specify the time that should be called when don't recv data
216230
* Parameters : espconn -- the espconn used to the connection
217-
* interval -- the timer when don't recv data
231+
* interval -- the timer when don't recv data
218232
* Returns : none
219233
*******************************************************************************/
220234

@@ -234,12 +248,69 @@ sint8 espconn_get_connection_info(struct espconn *pespconn, remot_info **pcon_in
234248
* FunctionName : espconn_get_packet_info
235249
* Description : get the packet info with host
236250
* Parameters : espconn -- the espconn used to disconnect the connection
237-
* infoarg -- the packet info
251+
* infoarg -- the packet info
238252
* Returns : the errur code
239253
*******************************************************************************/
240254

241255
sint8 espconn_get_packet_info(struct espconn *espconn, struct espconn_packet* infoarg);
242256

257+
/******************************************************************************
258+
* FunctionName : espconn_port
259+
* Description : access port value for client so that we don't end up bouncing
260+
* all connections at the same time .
261+
* Parameters : none
262+
* Returns : access port value
263+
*******************************************************************************/
264+
265+
uint32 espconn_port(void);
266+
267+
/******************************************************************************
268+
* FunctionName : espconn_set_opt
269+
* Description : access port value for client so that we don't end up bouncing
270+
* all connections at the same time .
271+
* Parameters : espconn -- the espconn used to set the connection
272+
* opt -- the option to set
273+
* Returns : access port value
274+
*******************************************************************************/
275+
276+
sint8 espconn_set_opt(struct espconn *espconn, uint8 opt);
277+
278+
/******************************************************************************
279+
* FunctionName : espconn_clear_opt
280+
* Description : clear the option for connections so that we don't end up bouncing
281+
* all connections at the same time .
282+
* Parameters : espconn -- the espconn used to set the connection
283+
* opt -- the option for clear
284+
* Returns : the result
285+
*******************************************************************************/
286+
287+
sint8 espconn_clear_opt(struct espconn *espconn, uint8 opt);
288+
289+
/******************************************************************************
290+
* FunctionName : espconn_set_keepalive
291+
* Description : access level value for connection so that we set the value for
292+
* keep alive
293+
* Parameters : espconn -- the espconn used to set the connection
294+
* level -- the connection's level
295+
* value -- the value of time(s)
296+
* Returns : access port value
297+
*******************************************************************************/
298+
299+
sint8 espconn_set_keepalive(struct espconn *espconn, uint8 level, void* optarg);
300+
301+
/******************************************************************************
302+
* FunctionName : espconn_get_keepalive
303+
* Description : access level value for connection so that we get the value for
304+
* keep alive
305+
* Parameters : espconn -- the espconn used to get the connection
306+
* level -- the connection's level
307+
* Returns : access keep alive value
308+
*******************************************************************************/
309+
310+
sint8 espconn_get_keepalive(struct espconn *espconn, uint8 level, void *optarg);
311+
312+
/***** CALLBACKS *******/
313+
243314
/******************************************************************************
244315
* FunctionName : espconn_regist_sentcb
245316
* Description : Used to specify the function that should be called when data
@@ -253,9 +324,9 @@ sint8 espconn_get_packet_info(struct espconn *espconn, struct espconn_packet* in
253324
sint8 espconn_regist_sentcb(struct espconn *espconn, espconn_sent_callback sent_cb);
254325

255326
/******************************************************************************
256-
* FunctionName : espconn_regist_sentcb
327+
* FunctionName : espconn_regist_write_finish
257328
* Description : Used to specify the function that should be called when data
258-
* has been successfully delivered to the remote host.
329+
* has been successfully written to the send buffer
259330
* Parameters : espconn -- espconn to set the sent callback
260331
* sent_cb -- sent callback function to call for this espconn
261332
* when data is successfully sent
@@ -264,17 +335,6 @@ sint8 espconn_regist_sentcb(struct espconn *espconn, espconn_sent_callback sent_
264335

265336
sint8 espconn_regist_write_finish(struct espconn *espconn, espconn_connect_callback write_finish_fn);
266337

267-
/******************************************************************************
268-
* FunctionName : espconn_sent
269-
* Description : sent data for client or server
270-
* Parameters : espconn -- espconn to set for client or server
271-
* psent -- data to send
272-
* length -- length of data to send
273-
* Returns : none
274-
*******************************************************************************/
275-
276-
sint8 espconn_sent(struct espconn *espconn, uint8 *psent, uint16 length);
277-
278338
/******************************************************************************
279339
* FunctionName : espconn_regist_connectcb
280340
* Description : used to specify the function that should be called when
@@ -318,59 +378,7 @@ sint8 espconn_regist_reconcb(struct espconn *espconn, espconn_reconnect_callback
318378

319379
sint8 espconn_regist_disconcb(struct espconn *espconn, espconn_connect_callback discon_cb);
320380

321-
/******************************************************************************
322-
* FunctionName : espconn_port
323-
* Description : access port value for client so that we don't end up bouncing
324-
* all connections at the same time .
325-
* Parameters : none
326-
* Returns : access port value
327-
*******************************************************************************/
328-
329-
uint32 espconn_port(void);
330-
331-
/******************************************************************************
332-
* FunctionName : espconn_set_opt
333-
* Description : access port value for client so that we don't end up bouncing
334-
* all connections at the same time .
335-
* Parameters : none
336-
* Returns : access port value
337-
*******************************************************************************/
338-
339-
sint8 espconn_set_opt(struct espconn *espconn, uint8 opt);
340-
341-
/******************************************************************************
342-
* FunctionName : espconn_clear_opt
343-
* Description : clear the option for connections so that we don't end up bouncing
344-
* all connections at the same time .
345-
* Parameters : espconn -- the espconn used to set the connection
346-
* opt -- the option for clear
347-
* Returns : the result
348-
*******************************************************************************/
349-
350-
sint8 espconn_clear_opt(struct espconn *espconn, uint8 opt);
351-
352-
/******************************************************************************
353-
* FunctionName : espconn_set_keepalive
354-
* Description : access level value for connection so that we set the value for
355-
* keep alive
356-
* Parameters : espconn -- the espconn used to set the connection
357-
* level -- the connection's level
358-
* value -- the value of time(s)
359-
* Returns : access port value
360-
*******************************************************************************/
361-
362-
sint8 espconn_set_keepalive(struct espconn *espconn, uint8 level, void* optarg);
363-
364-
/******************************************************************************
365-
* FunctionName : espconn_get_keepalive
366-
* Description : access level value for connection so that we get the value for
367-
* keep alive
368-
* Parameters : espconn -- the espconn used to get the connection
369-
* level -- the connection's level
370-
* Returns : access keep alive value
371-
*******************************************************************************/
372-
373-
sint8 espconn_get_keepalive(struct espconn *espconn, uint8 level, void *optarg);
381+
/***** DNS *******/
374382

375383
/******************************************************************************
376384
* TypedefName : dns_found_callback
@@ -405,6 +413,8 @@ typedef void (*dns_found_callback)(const char *name, ip_addr_t *ipaddr, void *ca
405413

406414
err_t espconn_gethostbyname(struct espconn *pespconn, const char *hostname, ip_addr_t *addr, dns_found_callback found);
407415

416+
/***** SSL *******/
417+
408418
/******************************************************************************
409419
* FunctionName : espconn_encry_connect
410420
* Description : The function given as connection
@@ -427,7 +437,7 @@ sint8 espconn_secure_disconnect(struct espconn *espconn);
427437
* FunctionName : espconn_encry_sent
428438
* Description : sent data for client or server
429439
* Parameters : espconn -- espconn to set for client or server
430-
* psent -- data to send
440+
* psent -- data to send
431441
* length -- length of data to send
432442
* Returns : none
433443
*******************************************************************************/
@@ -438,8 +448,8 @@ sint8 espconn_secure_sent(struct espconn *espconn, uint8 *psent, uint16 length);
438448
* FunctionName : espconn_secure_set_size
439449
* Description : set the buffer size for client or server
440450
* Parameters : level -- set for client or server
441-
* 1: client,2:server,3:client and server
442-
* size -- buffer size
451+
* 1: client,2:server,3:client and server
452+
* size -- buffer size
443453
* Returns : true or false
444454
*******************************************************************************/
445455

@@ -449,7 +459,7 @@ bool espconn_secure_set_size(uint8 level, uint16 size);
449459
* FunctionName : espconn_secure_get_size
450460
* Description : get buffer size for client or server
451461
* Parameters : level -- set for client or server
452-
* 1: client,2:server,3:client and server
462+
* 1: client,2:server,3:client and server
453463
* Returns : buffer size for client or server
454464
*******************************************************************************/
455465

@@ -464,23 +474,7 @@ sint16 espconn_secure_get_size(uint8 level);
464474

465475
sint8 espconn_secure_accept(struct espconn *espconn);
466476

467-
/******************************************************************************
468-
* FunctionName : espconn_igmp_join
469-
* Description : join a multicast group
470-
* Parameters : host_ip -- the ip address of udp server
471-
* multicast_ip -- multicast ip given by user
472-
* Returns : none
473-
*******************************************************************************/
474-
sint8 espconn_igmp_join(ip_addr_t *host_ip, ip_addr_t *multicast_ip);
475-
476-
/******************************************************************************
477-
* FunctionName : espconn_igmp_leave
478-
* Description : leave a multicast group
479-
* Parameters : host_ip -- the ip address of udp server
480-
* multicast_ip -- multicast ip given by user
481-
* Returns : none
482-
*******************************************************************************/
483-
sint8 espconn_igmp_leave(ip_addr_t *host_ip, ip_addr_t *multicast_ip);
477+
/***** TCP RX HOLD *******/
484478

485479
/******************************************************************************
486480
* FunctionName : espconn_recv_hold
@@ -498,11 +492,33 @@ sint8 espconn_recv_hold(struct espconn *pespconn);
498492
*******************************************************************************/
499493
sint8 espconn_recv_unhold(struct espconn *pespconn);
500494

495+
/***** IGMP *******/
496+
497+
/******************************************************************************
498+
* FunctionName : espconn_igmp_join
499+
* Description : join a multicast group
500+
* Parameters : host_ip -- the ip address of udp server
501+
* multicast_ip -- multicast ip given by user
502+
* Returns : none
503+
*******************************************************************************/
504+
sint8 espconn_igmp_join(ip_addr_t *host_ip, ip_addr_t *multicast_ip);
505+
506+
/******************************************************************************
507+
* FunctionName : espconn_igmp_leave
508+
* Description : leave a multicast group
509+
* Parameters : host_ip -- the ip address of udp server
510+
* multicast_ip -- multicast ip given by user
511+
* Returns : none
512+
*******************************************************************************/
513+
sint8 espconn_igmp_leave(ip_addr_t *host_ip, ip_addr_t *multicast_ip);
514+
515+
/***** mDNS *******/
516+
501517
/******************************************************************************
502518
* FunctionName : espconn_mdns_init
503519
* Description : register a device with mdns
504520
* Parameters : ipAddr -- the ip address of device
505-
* hostname -- the hostname of device
521+
* hostname -- the hostname of device
506522
* Returns : none
507523
*******************************************************************************/
508524

0 commit comments

Comments
 (0)