1
0
mirror of https://github.com/elua/elua.git synced 2025-01-25 01:02:54 +08:00

867 Commits

Author SHA1 Message Date
Andreas Bogk
58bbea8bfd Add header file for USB CDC driver. 2015-04-24 14:43:04 +02:00
Andreas Bogk
6512ce66c9 Hook up USB pins using board description mechanism, call USB CDC functions from platform UART code. 2015-04-24 14:43:04 +02:00
Andreas Bogk
480acc200b Some more cleanup. 2015-04-24 14:43:04 +02:00
Andreas Bogk
39c4521013 Make sure everything compiles, is nicely dependent on USB CDC activation in board config. 2015-04-24 14:43:04 +02:00
Andreas Bogk
480d6352ea Bring type definitions in line with eLua standard conventions. 2015-04-24 14:43:04 +02:00
Andreas Bogk
cc425be821 Import of LPCUSB library. 2015-04-24 14:43:04 +02:00
Andreas Bogk
e47ec9438a Delete trailing whitespace 2015-04-23 14:52:39 +02:00
Andreas Bogk
e17e93e039 Only include either generic lpc17xx PIO module or MBED specific, not both 2015-04-23 14:51:29 +02:00
Andreas Bogk
7845c8b34f Proper functionality for remapping pins from board description, generic board package for remapping from within lua. 2015-04-23 14:46:22 +02:00
Andreas Bogk
06148495f1 Work in progress support for configurable pin layout 2015-04-23 14:22:00 +02:00
Andreas Bogk
8e2366b75a Rename CPU frequency calculation function, as it is platform-specific, not board-specific. 2015-04-21 16:38:16 +02:00
Andreas Bogk
a7950b4d08 Build MBED PIO for MBED only 2015-04-21 14:47:12 +02:00
Andreas Bogk
02e668c35e Bring Bool definition more in line with other platforms. 2015-04-21 13:46:19 +02:00
Andreas Bogk
3f09d29a73 Remove configurability for RTC quartz, as this is 32768 anyways. 2015-04-21 12:08:05 +02:00
Andreas Bogk
e5d71d0a59 Support different clock rates on LPC17xx (100MHz on MBED, 120MHz on LPCXPresso) 2015-04-21 00:02:20 +02:00
James Snyder
f175d86639 Merge pull request #60 from andreas23/master
Fix build for MBED, add initial support for LPCXpresso LPC1769
2015-04-20 11:34:35 -05:00
Andreas Bogk
943c5a83b9 Fix build for MBED, add initial support for LPCXpresso LPC1769 2015-04-20 15:36:09 +02:00
denis
51b800acd6 improve shell compatibility with vt100, fix #57 2015-04-19 20:35:30 -05:00
James Snyder
68a5a0f26c correct typo in cpu header for stm32f411re 2015-04-17 10:52:38 -05:00
James Snyder
d2b4c4a9e4 add initial support for nucleo-stm32f411re 2015-04-17 10:26:07 -05:00
denis
377567feab better handling of CR/LF 2015-03-12 12:25:19 +03:00
Mark Burton
69e42e03c4 Cast around warnings in stm32_enc_init() and stm32_enc_set_counter(). 2014-07-13 17:37:02 +01:00
James Snyder
c216dd2396 stm32f4: notify usb host of device startup 2014-06-18 11:38:28 -05:00
James Snyder
382a49c749 Merge pull request #50 from ecdr/MiscUpdates
LM3S - correct cpu in ek-lm3s6965 board file, ethernet functions, enable cdc in board files
2014-05-11 15:44:13 -05:00
Bogdan Marinescu
595078219e Merge pull request #51 from smartavionics/mb-stm32f4-tck-pulldown
STM32F4 - TCK/SWDCLK should be pulled down, not up.
2014-05-07 20:28:32 +01:00
Mark Burton
3a56fd7822 STM32F4 - TCK/SWDCLK should be pulled down, not up. 2014-05-06 08:29:16 +01:00
ecdr
1202076a3e STM32 - #elseif -> #elif 2014-05-04 16:44:33 -07:00
James Snyder
069510c324 handle zero element size for bitarray 2014-04-22 14:50:34 -05:00
James Snyder
03b2ff1ad6 remove unnecessary signed comparisons with unsigned type 2014-04-22 14:45:49 -05:00
James Snyder
62589e467f check that INT_TMR_MATCH is not set to invalid interrupt 2014-04-22 11:28:29 -05:00
James Snyder
02a128b34b remove unused variable from bit library 2014-04-17 19:16:56 -05:00
James Snyder
5c0f204775 Make sure we actually get a file descriptor before creating new WOFS file 2014-04-17 12:54:18 -05:00
James Snyder
fc8f3e4a3d prevent calling tmr_int_handler with negative numbers since id indexes into an array 2014-04-17 12:29:12 -05:00
James Snyder
edbe57047f missing return on stm32[f4] enc handler set functions 2014-04-17 12:18:23 -05:00
ecdr
0faa1a6bbc LM3S - ethernet - make platform net functions use their arguments
rather than assuming they are dealing with uip_buf
2014-04-16 21:43:40 -07:00
ecdr
be21b8db53 uip-conf.h (various platforms) - note inconsistency -
comment says UIP_CONF_UDP_CHECKSUMS should be 0, but it is 1
so which is right?  (comment or code)
2014-04-16 21:43:39 -07:00
ecdr
a0a54c23df STM32F4 - uip-conf.h - replace with identical file with less restrictive copyright 2014-04-16 21:43:39 -07:00
ecdr
ecdb92070a pio.c - remove redundant include (lualib.h includes lua.h) 2014-04-16 21:43:38 -07:00
James Snyder
8405e9bbbb Make LuaRPC funcname long enough for null termination 2014-04-15 10:59:44 -05:00
James Snyder
06dd9a295d Fix missing element in external ints for stm32
- stm32, stm32f2 & stm32f4 were missing EXTI_Line11 in external
  interrupts source list, causing out of bounds & interrupt source
  identification
2014-04-15 10:42:25 -05:00
Mark Burton
55dd1f908c Keep the timer running when stopping timer generated cyclic interrupts.
For some reason (unknown to me) platform_s_timer_set_match_int() was clearing
the timer's CR1 and CR2 regs when the interrupts are to be stopped. This
had the effect of stopping the timer completely so a delay() on that timer
would hang forever. Now the timer keeps running and can be used normally
after the interrupts have been stopped.
2014-04-06 12:13:33 +01:00
Mark Burton
d55c74be67 In platform_s_timer_delay() don't assume timer reload value is all ones.
If the timer has been used to clock ADC or PWM or to generate interrupts
the reload value is unlikely to be all ones. The reload value will be
all ones if the timer has just been used as an elua timer.

So, when the timer wraps use the real reload value which is in ARR rather
than assuming it is 0xFFFF or 0xFFFFFFFF.
2014-04-06 12:09:21 +01:00
Mark Burton
324b0e7db8 Fix platform_s_timer_delay() so it doesn't hang when specified delay is too large.
Previously, if the specified delay resulted in a final value that
was wider than the timer width, the code would loop forever because the
timer counter would never reach the value of final.

Now, it checks to see if the timer has wrapped and, if so, reduces the value
of final by the timer's max count value.

An added benefit is that now all timers can delay for up to the maximum
delay handled by the target whereas previously the maximum delay was limited
by the width of the counter.
2014-04-06 09:21:59 +01:00
Mark Burton
d37f0e3331 Add support for 32 bit timers TIM2 and TIM5 (id 1 and 4).
These timers now handle 32 bit counts & delays.
2014-04-06 09:14:10 +01:00
Bogdan Marinescu
f20e817ee8 Merge pull request #47 from smartavionics/stm32f4-nucleo
Stm32f4 nucleo
2014-03-25 20:21:01 +00:00
Bogdan Marinescu
943189bb26 Merge pull request #45 from ecdr/MiscUpdates
Misc updates
2014-03-25 20:20:35 +00:00
Bogdan Marinescu
c0e9b8bf97 Merge pull request #41 from smartavionics/mb-stm32f4-cpu-additions
Add getclksfreq(), wfe(), wfi(), rnd.setup() and rnd.read() functions.
2014-03-25 20:18:28 +00:00
Mark Burton
baa5d9c76d Rework configuration of STM32F4 HSI clock.
Now, to use the HSI clock, specify an internal clock frequency in the
"clocks" config section, like this...

clocks = { internal = 16000000, cpu = 84000000 }

Don't specify an external frequency as well as the internal frequency.
2014-03-20 18:31:48 +00:00
Mark Burton
e2121e72fa Now determines the required flash latency from the system clock frequency.
This assumes that the MCU supply voltage is at least 2.7V.
2014-03-20 18:18:21 +00:00
Mark Burton
1611fab94b Can't use HSE clock on the Nucleo board as it's not populated.
The board as supplied does not provide any external clock to the F4.
It could supply an 8MHz clock from the STLINK part but, by default, it
isn't configured to do that.

So just use the HSI instead of the HSE - it won't be good for USB or fast
CAN bit rates but should be fine for bit banging, etc.
2014-03-20 16:46:02 +00:00