Commit graph

67 commits

Author SHA1 Message Date
Angus Gratton
f993e51250 timers.h: Remove compile-time-auto-inlining complexity
Fixes bug mentioned in #72 (oops!), also progress towards #57.
2015-11-28 16:32:52 +11:00
Angus Gratton
e9d6e81b76 registers.h: Add i2s, SLC, RTC register headers 2015-11-20 17:56:38 +11:00
Angus Gratton
421acdc40f RTC registers: Add some notes about other register values
Still patchy, but more towards #8.
2015-11-20 17:49:46 +11:00
Angus Gratton
f146a3c0cd Add in-progress RTC register header (some registers still undocumented)
Author for this work is @foogod, extracted from 1da996e (open-libmain branch).

Progress towards #8.
2015-11-20 17:31:11 +11:00
Angus Gratton
9cf558dc5d Add SLC interrupt number 1. Closes #69 2015-11-20 17:25:15 +11:00
Dag Ågren
2b5d93baec Add static asserts and create slc.h header for descriptor struct 2015-11-19 21:14:16 +02:00
Dag Agren
fd7745cdbc Add I2S and SLC register headers 2015-11-16 00:20:16 +02:00
Angus Gratton
140ce14ef6 GPIO2 UART iomux values: Remove _BLINK from macro name
This pin acts as a real TX not an activity LED as some pages suggest.
2015-10-28 20:31:50 +11:00
Angus Gratton
301372976d iomux: Fix bug setting IOMUX_FUNC(4)
Function masking value was incorrect
2015-10-28 20:31:44 +11:00
Angus Gratton
9c1307c5d1 Merge branch 'master' into uart_h 2015-10-06 18:37:28 +11:00
Angus Gratton
5c4cbf69cf Merge pull request #50 from SuperHouse/fix/interrupts
Fix/interrupts
2015-10-06 18:36:03 +11:00
Angus Gratton
25d3c54c5b uart.h: Add uart_get_baud/uart_set_baud functions, change default baud rate from 74906 to 115200 2015-10-06 17:49:00 +11:00
Alex Stewart
14a05facda Fix issue #52. Add esp/uart.h 2015-10-05 21:51:57 -07:00
Angus Gratton
50f8b3d338 core headers: Add C++ linker compatibility 2015-10-05 18:33:32 +11:00
Angus Gratton
23ea182e83 Simplify interrupt and RTOS timer tick handlers
RTOS Timer tick handler is now the same as any other ISR.

This causes a few subtle behaviour changes that seem OK but are worth noting:

* RTOS tick handler sdk__xt_timer_int() is now called from one stack
  frame deeper (inside _xt_isr_handler()), whereas before it was called
  from the level above in UserHandleInterrupt. I can't see any way that
  the extra ~40 bytes of stack use here hurt, though.

* sdk__xt_timer_int() was previous called after all other interrupts
  flagged in the handler, now it's called before the TIMER FRC1 & FRC2
  handlers. The tick handler doesn't appear to do anything particularly
  timing intensive, though.

* GPIO interrupt (value 3) is now lower priority than the SPI
  interrupt (value 2), whereas before it would have been called before
  SPI if both interrupts triggered at once.
2015-09-29 13:21:04 +10:00
Angus Gratton
9f7a5a7fdd Consolidate interrupt management in core as esp/interrupts.h & esp_interrupts.c 2015-09-28 22:15:40 +10:00
Angus Gratton
8f7f246a36 Refactor Hardware RNG functions to esp/hwrand.h
As suggested by @foogod, thanks!
2015-09-24 20:48:16 +10:00
Angus Gratton
8bcab35d51 Merge branch 'master' into feature/mbedtls 2015-09-24 20:40:36 +10:00
Alex Stewart
7b353b15d5 Merge branch 'master' into open-startup 2015-09-20 14:05:54 -07:00
Angus Gratton
18381f88fe mbedTLS: Add ESP8266 hardware entropy source discovered by @foogod
Addresses #3, provided turns out to be an effective HWRNG.
2015-09-20 21:15:30 +10:00
Angus Gratton
77813c8032 Rename GPIO_CONF_PUSH_PULL to GPIO_CONF_OPEN_DRAIN
Seems I got the functionality of this bit inverted when
initially testing.

In testing it also seems open drain mode is ignored on some pins, which
still source current. Needs more investigation though (may be pullups
internal to the ESP modules or set by default in software.)

Relates to #45
2015-09-20 21:13:38 +10:00
Angus Gratton
72377c4cd5 iomux: Fix setting of invalid bits when masking in iomux fields
Fixes regression from 2a939e97

Part of issue #45
2015-09-20 21:13:38 +10:00
Angus Gratton
f2651d1be3 common_macros: Include sys/cdefs.h, defines _Static_assert among others 2015-09-20 21:13:38 +10:00
Angus Gratton
8324a0ccc4 gpio.h: Explicit cast to enum type (needed for g++) 2015-09-20 21:13:38 +10:00
Michael Jacobsen
436aa8b8cc Mostly updated header files for use in C++ 2015-09-20 21:13:38 +10:00
Angus Gratton
df8eaeec8c Merge branch 'feature/c++' 2015-09-12 16:27:26 +10:00
Angus Gratton
f585ed8f46 Rename GPIO_CONF_PUSH_PULL to GPIO_CONF_OPEN_DRAIN
Seems I got the functionality of this bit inverted when
initially testing.

In testing it also seems open drain mode is ignored on some pins, which
still source current. Needs more investigation though (may be pullups
internal to the ESP modules or set by default in software.)

Relates to #45
2015-09-12 16:21:26 +10:00
Angus Gratton
d5141b3077 iomux: Fix setting of invalid bits when masking in iomux fields
Fixes regression from 2a939e97

Part of issue #45
2015-09-12 15:23:42 +10:00
Angus Gratton
e61e84ca7d libc: Redefine int32_t/uint32_t as 'int' not 'long'
libc built from projectgus/newlib-xtensa@0077776963

Closes #42
2015-09-05 13:37:00 +10:00
Alex Stewart
3e138c800f More app_main.c fixups
It's alive! IT'S ALIVE!!
2015-08-28 18:53:43 -07:00
Alex Stewart
f6f57aa81c More app_main fixups from object code comparisons 2015-08-28 18:53:43 -07:00
Alex Stewart
d55da0f09a Various app_main.c bug fixes 2015-08-28 18:53:43 -07:00
Alex Stewart
ec8c3c134a Replace libmain:app_main.o with core/app_main.c 2015-08-28 18:53:43 -07:00
Alex Stewart
78be94744c Fix broken UART(i) definition 2015-08-25 22:31:47 -07:00
Angus Gratton
3408ba6fe9 common_macros: Include sys/cdefs.h, defines _Static_assert among others 2015-08-26 11:11:31 +10:00
Angus Gratton
d7641d0010 gpio.h: Explicit cast to enum type (needed for g++) 2015-08-26 10:49:00 +10:00
Angus Gratton
e43d2dd3de Merge branch 'master' into feature/c++ 2015-08-26 10:46:48 +10:00
Alex Stewart
0155632dd3 Remove 'packed' attribute from all regs structs 2015-08-25 17:13:13 -07:00
Alex Stewart
b76bf99d7c Remove unnecessary AND for VAL2FIELD macro
Added VAL2FIELD_M / SET_FIELD_M for rare cases when there might actually be some need for it.
2015-08-25 17:07:06 -07:00
Angus Gratton
76ad427dc2 Merge pull request #29 from foogod/issue_8
Add more *_regs.h definitions
2015-08-24 16:14:19 +10:00
Angus Gratton
08bb9f16e7 Add a comment explaining commented out REG_BASE lines
Change was part of #27
2015-08-22 17:39:25 +10:00
Alex Stewart
9f3f3e5b08 Add esp/rtcmem_regs.h 2015-08-21 14:20:00 -07:00
Alex Stewart
b482a1cc77 Fix a couple of struct def issues with 2 previous commits 2015-08-21 14:06:38 -07:00
Alex Stewart
3f3f257612 Add more regs to esp/dport_regs.h
Added a bunch of definitions based on info in http://esp8266-re.foogod.com/wiki/Memory_Map#dport0
2015-08-21 13:59:20 -07:00
Alex Stewart
af32217805 Add esp/uart_regs.h and esp/spi_regs.h 2015-08-21 13:56:23 -07:00
Alex Stewart
d79c1c3983 rename GPIO_CONF_DRIVER_ENABLE back to GPIO_CONF_PUSH_PULL 2015-08-21 09:54:20 -07:00
Alex Stewart
13b924d259 Fix leftover IOMUX_FUNC_A/D references 2015-08-19 16:53:02 -07:00
Alex Stewart
0d6af96f2d Cleanup a few comments in *_regs.h files 2015-08-19 16:50:56 -07:00
Alex Stewart
c32a6692a0 Add esp/wdt_regs.h 2015-08-19 16:48:11 -07:00
Alex Stewart
eaa090e267 Added esp/timer_regs.h and esp/dport_regs.h 2015-08-19 11:34:18 -07:00