1
0
mirror of https://github.com/elua/elua.git synced 2025-01-08 20:56:17 +08:00

1262 Commits

Author SHA1 Message Date
ecdr
593044af24 LM3S - platform.c - remove duplicate include 2014-03-19 21:48:59 -08:00
ecdr
025dabfc6a LM3S - platform.c - MAP_ - Use ROM versions of library if available 2014-03-19 21:48:58 -08:00
ecdr
02fa7beac4 LM3S - platform_int - use platform_pio_get_num_pins rather than assuming 8 pins per port 2014-03-19 21:48:58 -08:00
ecdr
307de046e2 LM3S - startup_gcc - use console UART, rather than assuming UART0 2014-03-19 21:48:57 -08:00
ecdr
cb849d0d46 LM3S - startup_gcc.c - human readable error messages for default ISRs
also, use ROM versions of UARTCharPut, if available
2014-03-19 21:48:57 -08:00
ecdr
7dc3b36b52 platform.h - note unused constants
PLATFORM_SPI_TOTAL, PLATFORM_UART_TOTAL, PLATFORM_PWM_TOTAL

TODO: Figure out purpose, or remove them
2014-03-19 21:48:56 -08:00
ecdr
1019acf756 elua i2c module - fix comment 2014-03-19 21:48:56 -08:00
ecdr
dd5053fb29 eLua - comments - include return from functions in can, i2c 2014-03-19 21:48:55 -08:00
ecdr
c4493d48a4 DOC - CAN - fix typo 2014-03-19 21:48:55 -08:00
Bogdan Marinescu
ea93180b5b Merge pull request #44 from smartavionics/stm32f4-nucleo
Ported to STM32F401 Nucleo board.
2014-03-19 12:46:37 +00:00
Mark Burton
8c6757e856 Ported to STM32F401 Nucleo board.
The Nucleo boards are like the Discovery boards in that they come with an
attached STLINK-V2 programmer. The MCU's UART2 is routed through the
programmer's USB connection and it appears as a VCP device on the host.

So far, this has only been tested to the extent that the elua shell and
lua prompt appear to be functioning as expected.
2014-03-19 12:10:45 +00:00
James Snyder
044f861a90 Merge pull request #43 from smartavionics/mb-misc-mods
Fixes for a compilation problem and a race in the system timer code.
2014-02-24 19:00:40 -06:00
Mark Burton
e9f23cc33f Reorder assignments in cmn_systimer_get() to avoid race.
Before, it was possible for the system timer counter to wrap from high to low
after its value had been read but before the value of cmn_systimer_counter
was read and so the resulting sum of those values would be too large.

By reordering the assignments, we can now detect if cmn_systimer_counter has
been advanced while reading the system timer counter value and, if so, repeat
the assignments to ensure consistent values.
2014-02-23 18:07:06 +00:00
Mark Burton
e11180bc75 For STM32, use CAN_NO_MB instead of CAN_TxStatus_NoMailBox. 2014-02-23 16:19:13 +00:00
James Snyder
379195945b Merge pull request #42 from smartavionics/mb-misc-mods
Change a couple of #warn directives to #warning.
2014-02-10 12:33:19 -06:00
Mark Burton
142e809699 Change a couple of #warn directives to #warning. 2014-02-10 16:30:20 +00:00
James Snyder
4456f990ff Merge pull request #39 from smartavionics/mb-misc-mods
Mb misc mods
2014-02-09 15:27:15 -06:00
James Snyder
b1361bcf2e Merge pull request #40 from smartavionics/mb-stm32f4-can-timing
Add CAN bit timing values for use with 120 MHz and 96 MHz system clocks.
2014-02-09 15:24:10 -06:00
Mark Burton
ff090e8df8 Add CAN bit timing values for use with 120 MHz and 96 MHz system clocks.
The values used produce sampling points around 65-70% which is similar
to the original set of values.

Values courtesy of http://www.bittiming.can-wiki.info/
2014-02-04 11:04:15 +00:00
Mark Burton
a9fd03053d Correct value of PLATFORM_TIMER_SYS_MAX for lua long builds.
It was being set to ( ( 1LL << 31 ) - 2 ) which only used 31 bits when 32
are available. By setting it to ( ( 1LL << 32 ) - 2 ) the range of the timer
is doubled to around 4295 seconds. Note that time values greater than
approx 2147 seconds will have the top bit (1 << 31) set and so will appear
to be negative as all numbers are considered to be signed.
2014-02-02 11:08:37 +00:00
Mark Burton
4ccaaf0e57 Avoid losing time when cmn_systimer_counter exceeds PLATFORM_TIMER_SYS_MAX.
Setting cmn_systimer_counter to zero when the systimer exceeded
PLATFORM_TIMER_SYS_MAX would cause time to jump backwards if
cmn_systimer_counter was already greater than PLATFORM_TIMER_SYS_MAX.

So now, instead of zeroing it, we subtract PLATFORM_TIMER_SYS_MAX.
2014-02-02 09:48:12 +00:00
Mark Burton
93fc647638 Avoid 64 bit divide in cmd_systimer_get(). 2014-02-02 09:42:27 +00:00
Mark Burton
5e81e42152 Now clears FIFO empty interrupt mask in DCD_WriteEmptyTxFifo() when transfer completes.
This fixes a problem whereby outputting to the USB UART when the host is
connected but the USB UART is not open would cause the interrupt
handler to be called continuously so it would consume 100% of the CPU.
2014-02-01 19:15:47 +00:00
Mark Burton
b95eea268b Avoid 64 bit mul+div in platform_timer_get_diff_us() when timer rate is 1 MHz. 2014-02-01 15:46:16 +00:00
James Snyder
b2f36c8ced Merge pull request #38 from smartavionics/mb-stm32f4-can2
Add support for the second stm32f4 CAN interface.
2014-01-27 11:54:48 -08:00
Mark Burton
c48bdf802c Add support for the second stm32f4 CAN interface.
This is copied from the stm32f2 code with some #if's added so that you can
select the MCU pins used for the CAN signals at compile time. Four configurations
are supported.

For example, the board config file can contain this:

  macros = { 'ELUA_BOARD_STM32F4_CAN_PIN_CONFIG_2' }
2014-01-27 15:17:24 +00:00
James Snyder
07ee92bd09 Merge pull request #37 from smartavionics/master
Missed from recent commit that added status return to platform_can_send() - sorry!
2014-01-27 06:56:16 -08:00
Mark Burton
324c02776d Missed from recent commit that added status return to platform_can_send() - sorry! 2014-01-27 10:39:06 +00:00
Bogdan Marinescu
0e504711c9 Merge pull request #36 from smartavionics/mb-can-send-result
Add status return to can.send() and underlying platform_can_send() functions.
2014-01-27 00:15:29 -08:00
Mark Burton
e120b9dc14 Add status return to can.send() and underlying platform_can_send() functions.
Now, can.send() returns a boolean result to indicate whether the message
was successfully sent or not. The various platform functions differ in how
they handled the situation where all CAN transmitters are occupied. In
particular, the STM32x and STR9 implementations ignored the status returns
from the underlying libraries and so if all the CAN transmitters were busy,
the latest message simply got thrown away. Now, can.send() returns true/false
to indicate if the message really did get queued for transmission. All
platforms should behave the same as before.
2014-01-25 19:29:33 +00:00
Bogdan Marinescu
495ec9e136 Merge pull request #35 from ecdr/MiscUpdates
Misc updates
2014-01-23 02:36:40 -08:00
ecdr
71c060bb81 eLua - platform - uart - handle mark/space parity - lm3s, lpc17xx, at91sam, avr32 2014-01-22 14:19:27 -08:00
ecdr
cb4f98640b lpc17xx - suppress compiler warnings (can - assume should be bitmask then compare) 2014-01-22 14:19:13 -08:00
ecdr
85b8d8324d eLua - suppress warnings, remove extra includes, fix comments 2014-01-22 14:18:50 -08:00
ecdr
608df36d0c eLua - mmcfs - suppress warnings (prototypes, static functions) 2014-01-22 14:17:48 -08:00
Bogdan Marinescu
6b36699e32 Merge pull request #34 from omnima/master
Committer: Omnima Dev Team  <info@omnima.co.uk>
2014-01-16 00:44:34 -08:00
Ivan Ignjatic
c610a2345f Committer: Omnima Dev Team <info@omnima.co.uk>
new file:   boards/known/omniexp.lua
2014-01-15 18:12:59 +00:00
James Snyder
ca7ae17b06 allow mbed target to build by defining luaopen_dummy earlier 2014-01-13 19:23:26 -06:00
James Snyder
b9367630f8 Merge branch 'master' of github.com:elua/elua 2013-11-21 15:47:45 -06:00
James Snyder
62936ace5e add back modules to luarpc desktop 2013-11-21 15:47:34 -06:00
James Snyder
8b51b3fa8e Merge pull request #33 from teachop/netduino-2-work
luaopen_dummy build error and WOFS autorun duplicate
2013-11-20 14:04:07 -08:00
teachop
ab069c4f96 delete WOFS autorun duplicates 2013-11-20 15:21:23 -05:00
teachop
84f5080926 move luaopen_dummy() to fix build error 2013-11-20 15:18:34 -05:00
James Snyder
c6b97d4605 update document text for enc module 2013-11-11 15:03:50 -06:00
James Snyder
4df361ffbb Merge branch 'stm32f4_enc'
- includes docs for enc module for stm32 and stm32f4
- migrates platform specific enc module from stm32 to stm32f4
- enables enc module on stm32f4 boards
- adds adjustment to modules build system to still include platform specific modules if some have
  guards and others do not when a guard fails
2013-11-11 14:33:07 -06:00
James Snyder
df10658c56 add doc for enc module and enable for other board configs 2013-11-11 14:27:42 -06:00
James Snyder
b9e5096027 Include remaining platform modules when some fail guards 2013-11-11 13:43:05 -06:00
James Snyder
9b3c8e6eba correct platform naming 2013-11-11 12:30:28 -06:00
James Snyder
0ad3d159f2 Merge branch 'master' into stm32f4_enc 2013-11-11 12:14:59 -06:00
Bogdan Marinescu
0dc442890c Merge pull request #32 from ecdr/MiscUpdates
Misc updates
2013-11-03 12:29:45 -08:00