Gregory Nutt
8f8d4b6ae3
arch/arm/src/stm32/stm32_hrtim.c: Fixed a typo found in build testing.
2019-02-27 08:56:35 -06:00
Gregory Nutt
dc8c814ca3
Squashed commit of the following:
...
Fixed coding standard error in several files. Use of while( is incorrect; a space is required between while and (. Also ran tools/nxstyle and fix thoses complaints as well in most files.
Changes to comply with coding standard. Mostly focused on files with missing space after keyword in if(, switch(, and for(. Offending files also got changes to comply with tools nxstyle. If there were logs of nxstyle complaints, the file also got a taste of tools/indent.sh. Still need to fix occurrences of while( with missing space. There are a lot of them.
2019-02-27 08:41:08 -06:00
Gregory Nutt
c664ed01ec
configs/nucleo-l073rz/src/stm32_buttons.c: By default button support is enabled. This causes errors because button support was not implemented for this configuration. Solution: Port button logic from nucleo-f072 which appears to be the same.
2019-02-26 12:16:32 -06:00
Gregory Nutt
ef49b5e1b5
include/nuttx/net/netdev.h: Update some comments.
2019-02-25 19:20:29 -06:00
Gregory Nutt
0951151c33
libs/libc/pthread, syscall/, and include/sys/syscall.h: Support for pthread_mutex_timedlock() was added recently, however no new system call was added for the API make is usable only in the FLAT build. With a pthread_mutex_timedlock() system call, there is no reason for a pthread_mutex_lock() system call since it is now nothing more than an wrapper around pthread_mutex_timedlock(), passing NULL for the time value. The pthread_mutex_lock() syscall was removed and the pthread_mutex_lock() implemented was moved from /sched/pthread to where it now belows in libs/libc/pthread.
2019-02-25 18:19:13 -06:00
David Sidrane
68f8161a45
arch/arm/src/imxrt/chip/imxrt_usb_analog.h: Add usb analog header file.
2019-02-25 13:09:19 -06:00
raiden00pl
3055d881c9
Merged in raiden00/nuttx_lora/lora (pull request #832 )
...
Add some sx127x demo configurations
configs/b-l072z-lrwan1/sx127x/defconfig: add configuration for sx127x demo app
configs/nucleo-f091rc/sx127x/defconfig: add configuration for sx127x demo app
configs/nucleo-l073rz/sx127x/defconfig: add configuration for sx127x demo app
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-02-25 17:05:35 +00:00
raiden00pl
b9ef70ed0f
Merged in raiden00/nuttx_h7/h7dma (pull request #831 )
...
Missing definitions and better organistaion for STM32H7 DMA
arch/arm/src/stm32f0l0/hardware/stm32_dma_v1.h: rename DMA channel definitions
arch/arm/src/stm32h7/chip/stm32_dma: separated files for MDMA, DMA, BDMA and DMAMUX
arch/arm/src/stm32h7/chip/stm32_dma: missing definitions for MDMA, BDMA and DMAMUX
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-02-25 16:02:39 +00:00
Gregory Nutt
9a5134acac
sched/pthread/pthread_mutexlock.c: Fix an error in last PR. The abs_timeout value as not being passed from pthread_mutex_timedlock() to pthread_mutex_take().
2019-02-24 16:04:48 -06:00
Gregory Nutt
c7cc6bab96
included/pthreads, sched/pthreads, and Documetions: Updates after review of last PR.
2019-02-24 14:40:11 -06:00
Leif Jakob
58e387fc6f
Merged in leif_jakob/nuttx/pthread_mutex_timedlock (pull request #830 )
...
support for pthread_mutex_timedlock
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-02-24 20:04:24 +00:00
raiden00pl
0523e8a1d0
Merged in raiden00/nuttx_lora (pull request #829 )
...
SX127X improvements
drivers/wireless/lpwan/sx127x/sx127x: add TX power configuration
drivers/wireless/lpwan/sx127x/sx127x: discard RX packets with unsupported length
drivers/wireless/lpwan/sx127x/sx127x: refactor some logic
drivers/wireless/lpwan/Kconfig: move some hardcoded sx127x configuration to Kconfig
drivers/wireless/lpwan/Kconfig: remove EXPERIMENTAL flag
configs/b-l072z-lrwan1/sx127x: board-specific sx127x configuration
configs/nucleo-f091rc/sx127x: board-specific sx127x configuration
configs/nucleo-l073rz/sx127x: board-specific sx127x configuration
LORA and FSK look fine but there is something missing for OOK and communication is not working yet.
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-02-24 17:58:46 +00:00
Gregory Nutt
4653260388
drivers/net: Run tools/detab, rmcr, lowhex, and nstyle against all files.
2019-02-24 11:51:25 -06:00
Gregory Nutt
7c2aa26486
drivers/net/tun.c: Costmetic changes from review for coding style compliance.
2019-02-24 10:10:38 -06:00
Gregory Nutt
3502425221
drivers/net/tun.c: Packet buffer size should include the configured GUARD_SIZE. And, given how the buffers are allocated, the allocation size must be an even number of 16-bit values to preserve alignment.
2019-02-24 09:52:18 -06:00
Gregory Nutt
4d3dd73e57
drivers/net/tun.c: Re-order all TUN/TAP driver state data. Not only was was with wasting memory due to alignement requirements, it was also causing network packet buffers to be improperly aligned causing problems because the network requires 16-bit packet buffer alignment for uint16_t accesses. This alignment problem was discovered by Alan Carvalho de Assis.
2019-02-24 09:43:30 -06:00
Gregory Nutt
11eb7ef4f8
Minor fixed to documents and C comments.
2019-02-23 17:46:43 -06:00
David Sidrane
8de101ca18
Merged in david_s5/nuttx-2/david_s5/imxrt_adcerror-in-offset-1550865183857 (pull request #828 )
...
imxrt_adc:Error in offset
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-02-22 19:58:39 +00:00
Gregory Nutt
a5183e3460
include/poll.h and include/nuttx/compiler.h: Update some comments; improved a conditional test.
2019-02-21 18:06:53 -06:00
Gregory Nutt
94fe5c8349
include/poll.h: Remove un-named union from 'struct pollfd'. It is not required by OpenGroup.org and violates the NuttX C coding standard because it is not C89 compatible.
2019-02-21 17:40:30 -06:00
Gregory Nutt
40889daf97
libs/libc/stdio/lib_libvsprintf.c and include/limits.h: Some minor corrections.
2019-02-21 14:52:44 -06:00
Gregory Nutt
d7586c27a5
libs/libc/stdio/Kconfig: Add 'range 9 999999' to CONFIG_LIBC_NL_ARGMAX. Per OpenGroup.org, the minimum value for NL_ARGMAX is 9.
2019-02-21 14:04:46 -06:00
Gregory Nutt
533fd0636e
libs/libc/lib_libvsprintf.c and Kconfig: Remove CONFIG_LIBC_PRINT_MINIMAL. The output in that configuration is unsatisfactory and inappropriate for use with NuttX. For example, the output from many NSH commands become corrupted and useless. Doesn't belong in this context.
2019-02-21 13:53:34 -06:00
Johannes
0059a5a88e
libs/libc/stdio/lib_vsprintf.c and Kconfig:
...
- Numbered arguments now work by using two pass parsing and an argument list.
The maximum number of numbered args is determined by CONFIG_LIBC_NL_ARGMAX
which is then copied into NL_ARGMAX.
- Size of pointer argument ('p') is determined before output.
include/limits.h: Define NL_ARGMAX (as well as some of the other 'invariant
values' per http://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html )
2019-02-21 13:26:33 -06:00
Gregory Nutt
146c398eff
libs/libc/stdio/lib_libvsprintf.c: Fix typo: PRINTF_LEVEL, not PRINT_LEVEL.
2019-02-20 08:40:27 -06:00
Gregory Nutt
05a68d175b
libs/libc/stdio/Kconfig: CONFIG_LIBC_NUMBERED_ARGS now depends on EXPERIMENTAL. Per Johannes: I tested numbered arguments on i.mx rt 1050, and it isn't working. Only on Linux/MSYS 64bit all relevant data types are size 8 bytes, and therefore my loop through the arg list is working. On 32bit systems, all is 4 bytes except floating point variables which is implicit 8 byte double.
2019-02-20 08:00:35 -06:00
Gregory Nutt
432f487581
arch/arm/src/stm32h7 and stm32l4: Apply David Sidrane's fix for the STM32F7 to the STM32L4 and STM32H7. The same change might be appropropriate to STMF0/LO and STM32, but the patch does not apply cleanly. It would have to be manually checked.
2019-02-19 14:47:27 -06:00
David Sidrane
44919b6723
arch/arm/src/stm32f7/stm32_i2c.c: Fix another memory access issue on a bus error.
2019-02-19 14:47:05 -06:00
Johannes
88130512b8
libs/libc/stdio/lib_libvsprintf.c: Cleaned naming and allow for leading zeros in argument number (which doesn't make sense but should be).
2019-02-19 13:08:54 -06:00
Anthony Merlino
840dab8c47
Merged in antmerlino/nuttx/elf-cplusplus-guard (pull request #826 )
...
include/nuttx/elf.h: Adds missing extern "C" __cplusplus guard.
Approved-by: GregoryN <gnutt@nuttx.org>
2019-02-19 15:24:25 +00:00
Gregory Nutt
e982488e6c
include/nuttx/compiler.h: Important fix for C++ users. compiler.h was using the value of __STDC_VERSION__ to determine if inline functions are supported or not. If not then the keyword inline was defined out. Good for C but bad for C++ because C++ does not defined __STDC_VERSION__ at all. C++ applications may draw in compiler.h indirectly via other head files and this can result in C++ compiler problems since 'inline' is defined out. This fix is to ignore the (undefined) __STDC_VERSION__ if __cplusplus is defined.
2019-02-19 09:04:04 -06:00
Gregory Nutt
7f11a45895
Update README files.
2019-02-18 17:54:28 -06:00
Gregory Nutt
2fbec4cdf6
Doumentation/NuttxPortingGuide.html: Add description of board_early_initialize() and board_late_initialize().
2019-02-18 17:36:11 -06:00
Gregory Nutt
32a300806e
Let's rename board_driver_initialize() to board_early_initialize() to emphasize its relationship to board_late_initialize().
2019-02-18 16:25:08 -06:00
Gregory Nutt
a76e137ce2
Squashed commit of the following:
...
sched/init/nx_start.c: Add support for CONFIG_BOARD_DRIVER_INITIALIZE. If this option is selected then nx_start() will call a board-provided function board_driver_initialize() immediately after calling up_initialize().
Rename CONFIG_BOARD_INITIALIZE to CONFIG_BOARD_LATE_INITIALIZE.
Raname board_initialize() to board_late_initialize()
2019-02-18 15:32:00 -06:00
Johannes
77aa1f1179
libs/libc/stdio/Kconfig: Need to guard LIBC_NUMBERED_ARGS against LIBC_LEGACY_PRINTF
2019-02-18 15:26:41 -06:00
Johannes
698d942f8d
libs/libc/stdio/lib_libvsprintf.c: Adds configurable support for numbered arguments.
2019-02-18 11:51:22 -06:00
Gregory Nutt
d9d2042f75
Revert "tools/check-hash.sh: Add a tool check hash on downloaded packages."
...
This tool was supposed to go to apps/tools, not nuttx/tools.
This reverts commit 41245f421e
.
2019-02-18 07:20:41 -06:00
Gregory Nutt
95746be5a2
arch/xtensa/src/esp32/esp32_timerisr.c: Fix backward comparison.
2019-02-17 18:02:26 -06:00
Gregory Nutt
a971171695
libs/libc/stdio/Make.defs: Make that else, not #else.
2019-02-17 16:07:54 -06:00
Gregory Nutt
3ff42a846e
libs/libc/stdio: Rename all nano_*.c and nano_*.h files to lib_*.c and lib_*.h to emphasize that these are now the defaults, not an optional implementation.
2019-02-17 12:29:50 -06:00
Gregory Nutt
f12eda8a05
libs/libc/stdio: Rename lib_dtoa.c to legacy_dtoa.c; rename lib_libvsprint.c to legacy_libvsprintf.c
2019-02-17 12:29:35 -06:00
Gregory Nutt
76a2f6c2a2
libs/libc/stdio: This commits makes the nano-printf the defualt logic for the printf family. The legacy printf is still available via CONFIG_LIBC_PRINT_LEGACY. This commit also modifies the nano-prinf configure: The PRINT_LEVEL is not long selectable. Instead, a not CONFIG_LIBC_PRINT_MINIMAL boolean setting was added and the PRINT_LEVEL is derived from a combination of CONFIG_LIBC_PRINT_MINIMAL, CONFIG_LIBC_FLOATINGPOINT, and CONFIG_LIBC_LONG_LONG.
2019-02-17 12:29:20 -06:00
Gregory Nutt
bc5908d9fd
tools/nxstyle.c: Beef up logic that detects multiple variable definitions per line.
2019-02-17 10:57:28 -06:00
Johannes
af75330012
libs/libc/stdio/nano_libvsprintf.c: Added hh type modifier (without extending the flag variable).
2019-02-17 07:27:47 -06:00
Gregory Nutt
738be875eb
arch/arm/src/tiva/hardware/tm4c/tm4c123_i2c.h: Correct some kruft that was left behind when this file was split out. Caused failures in build testing.
2019-02-16 18:42:26 -06:00
Gregory Nutt
67b16613ba
libs/libc/stdio/lib_dtoa.c: Lots of risky turmoil to get this file closer to the NuttX coding style. Seems to check out, but still risky. libs/libc/stdio/lib_libdtoa.c: A fix for the %g format. The algorithm will sometimes generate number greater than the precision of type double. This adds a check if the precision has been exceeded and logic to remove the least significant garbage.
2019-02-16 18:08:38 -06:00
raiden00pl
79b3bec208
Merged in raiden00/nuttx_lora (pull request #825 )
...
Master
arch/arm/src/stm32f0l0: SPI support for F0
arch/arm/src/stm32f0l0/Kconfig: L0 parts should select STM32F0L0_STM32L0
arch/arm/src/stm32f0l0/hardware: unify names for ADC/DAC/DMA/CAN
drivers/wireless/lpwan/sx127x/sx127x.c: return immediately when ISR0 is called but sx127x is not initialized
configs/nucleo-f091rc: support for sx127x
configs/nucleo-l073rz: cosmetics
configs/b-l072z-lrwan1/include/board.h: use HSI as default clock source and fix typo in SPI1 pins
Approved-by: GregoryN <gnutt@nuttx.org>
2019-02-16 20:53:16 +00:00
Gregory Nutt
4746b0cdd7
arch/arm/src/tiva/hardware/tiva_wdt.h: Add WDT register definition header file for all LM, Tiva, and CC13xx parts.
2019-02-16 14:49:23 -06:00
Gregory Nutt
c7599ac714
arch/arm/src/tiva/hardware/lm/lm_i2c.h: Fix missing #endif.
2019-02-16 13:56:00 -06:00