* Documentation/NuttXCCodingStandard.html: Remove requirement to decorate ignored returned values with (void).
* sched_mergepending.c: Correct some errors in comments.
Co-authored-by: Gregory Nutt <gnutt@nuttx.org>
Usage: ./nxstyle -r start,count filename
nxstyle with -r option used to parse the range lines rather than the whole file.
Change-Id: I58ec56511fde14d6ec914400a7849e69960a3711
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Author: Alan Carvalho de Assis <acassis@gmail.com>
Fix long line comments in the header files
Author: Mateusz Szafoni <raiden00pl@users.noreply.github.com>
* arch/arm/src/nrf52: add GPIOTE and SAADC registers definitions
* arch/arm/src/nrf52: update some registers definitions
* arch/arm/src/nrf52: add basic I2C support
* arch/arm/src/nrf52: add function to unconfigure GPIO
* arch/arm/src/nrf52/nrf52_lowputc: add missing FAR
Author: patacongo <spudarnia@yahoo.com>
Todo (#34)
* Documentation/NuttXCCodingStandard.html: Remove requirement to decorate ignored returned values with (void).
* TODO: Update TODO list
Co-authored-by: Gregory Nutt <gnutt@nuttx.org>
Author: Alan Carvalho de Assis <acassis@gmail.com>
Run all .h and .c files modified in last PR through nxstyle.
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Fix stm32l4_otgfshost.c: error: 'ret' undeclared (#32)
result by commit 6a3c2aded6
Change-Id: I68ba79417d8da102da8d91c74496961aef242dd9
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Run all .c and .h files in last PR through tools/nxstyle and fix all complaints.
Author: macman88 <jjlange91@gmail.com>
LPC17xx serial updates (#29)
* Save CONFIG_ARCH_BOARD_CUSTOM when running 'make savedefconfig'
* Don't compile up_earlyserialinit if USE_EARLYSERIALINIT is not defined
* Added support for RS485 direction control on LPC17xx UART1
* First pass at fractional baud rate divider on LPC17xx/40xx
* Added support for fractional divider to console UART
Author: patacongo <spudarnia@yahoo.com>
arch/arm/src/imxrt/imxrt_enet.c: Fix some warnings found in build testing.
Also fix coding standard problems reported by nxstyle. (#26)
Co-authored-by: Gregory Nutt <gnutt@nuttx.org>
Run all .c and .h files in last PR through nxstyle.
Author: macman88 <jjlange91@gmail.com>
SAME5x Ethernet Support (#25)
boards/arm/samd5e5/same54-xplained-pro/: Adds basic support for Microchip SAM E54 Xplained Pro board.
arch/arm/src/samd5e5/: Adds an Ethernet driver for the SAME5x family (based on the SAMA5 GMAC driver).
* Simplify EINTR/ECANCEL error handling
1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx
* Unify the void cast usage
1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
* fix ieee802154/ieee802154_input.c:179:7: error: too few arguments to function 'iob_free'
iob_free(container->ic_iob);
^~~~~~~~
ieee802154/ieee802154_input.c:180:7: error: too many arguments to function 'ieee802154_container_free'
ieee802154_container_free(container, IOBUSER_NET_SOCK_IEEE802154);
^~~~~~~~~~~~~~~~~~~~~~~~~
* fix udp/udp_netpoll.c:327:10: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
* fix local/local_netpoll.c:154:15: warning: implicit declaration of function 'nxsem_post'; did you mean 'sem_post'? [-Wimplicit-function-declaration]
nxsem_post(fds->sem);
^~~~~~~~~~
sem_post
Author: Alan Carvalho de Assis <acassis@gmail.com>
Run all .h and .c files modified in last PR through nxstyle.
Author: Minamiya_Natsuki <yukihiratype2@gmail.com>
Add FMC SDRAM for STM32H7x3 chip (#22)
* Add FMC SDRAM for STM32H7x3 chip
* Add FMC SDRAM for STM32H7x7
* Nuttx Coding Standard requires one declaration per line
* should be __ARCH_ARM_SRC_STM32H7_STM32_FMC_H
* fix bad alignment
* fix typo
* fix typo
* people can't live in furture
* fix comment line length
* fix more comment line length
* fix aligenment
* fix typo
net/udp/udp_wrbuffer.c: Add new function udp_wrbuffer_tryalloc()
net/udp/udp_psock_sendto_buffered.c: If the socket was opened with O_NONBLOCK, then use udp_wrbuffer_tryalloc() so that the caller will not wait for a write buffer. Return EGAIN if udp_wrbuffer_tryalloc() failes.
wireless/bluetooth/bt_null.c:274:10: warning: implicit declaration of function 'bt_driver_register'; did you mean 'bt_netdev_register'? [-Wimplicit-function-declaration]
return bt_driver_register(&g_bt_null);
sim_bringup.c:324:9: error: too few arguments to function 'bt_netdev_register'
ret = bt_netdev_register();
Author: Gregory Nutt <gnutt@nuttx.org>
Run all .h and .c files modified in last PR through nxstyle.
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Net cleanup (#17)
* Fix the semaphore usage issue found in tcp/udp
1. The count semaphore need disable priority inheritance
2. Loop again if net_lockedwait return -EINTR
3. Call nxsem_trywait to avoid the race condition
4. Call nxsem_post instead of sem_post
* Put the work notifier into free list to avoid the heap fragment in the long run. Since the allocation strategy is encapsulated internally, we can even refine the implementation later.
* Network stack shouldn't allocate memory in the poll implementation to avoid the heap fragment in the long run, other modification include:
1. Select MM_IOB automatically since ICMP[v6] socket can't work without the read ahead buffer
2. Remove the net lock since xxx_callback_free already do the same thing
3. TCP/UDP poll should work even the read ahead buffer isn't enabled at all
* Add NET_ prefix for UDP_NOTIFIER and TCP_NOTIFIER option to align with other UDP/TCP option convention
* Remove the unused _SF_[IDLE|ACCEPT|SEND|RECV|MASK] flags since there are code to set/clear these flags, but nobody check them.
Author: Gregory Nutt <gnutt@nuttx.org>
Run all .c and .h modified in PR through nxstyle.
Author: Masayuki Ishikawa <masayuki.ishikawa@gmail.com>
feature k210 (#16)
* arch: risc-v: Add support for __LP64__ to types.h
* arch: risc-v: Add support for RV64GC to common files
* arch: risc-v: Add support for Kendryte K210 processor (RV64GC)
* boards: risk-v: Add support for Sipeed Maix Bit with K210
* tools: Add support for Kendryte K210 processor
arch/arm/src/sama5/sam_serial.c: uart2port in sam_serial, fix the rest of the uarts in sam_serial
boards/arm/sama5/sama5d2-xult/README.txt: Fix some minor typos
boards/arm/sama5/sama5d2-xult/include/board.h: Update UART pin disambiguation with default UARTn_RXD, _TXD
Author: Gregory Nutt <gnutt@nuttx.org>
boards/arm/stm32l4/nucleo-l432kc/Kconfig: Correct use of spaces instead of TABs in Kconfig file.
Author: Pieter du Preez <wingunder@users.noreply.github.com>
Added Kconfig pin config chooser for nucleo-l432kc USARTs. (#11)
The USART pins were hard-coded for the nucleo-l432kc. This patch makes
these pins configurable via menuconfig.
STM32L4_NUSART was set to 4. The spec at
https://www.st.com/resource/en/datasheet/stm32l433cc.pdf states the
following on page 1:
- 4x USARTs (ISO 7816, LIN, IrDA, modem)
- 1x LPUART (Stop 2 wake-up)
However it on page 49, it states:
The STM32L433xx devices have three embedded universal synchronous
receiver transmitters (USART1, USART2 and USART3).
The latter is correct.
This patch sets STM32L4_NUSART to 3.
tools/nxstyle.c: Output compiler like error format. Added features
Uses getops to pars command line.
Supports
-s silence all output
-g provide a PASS fail message
* tools/README.txt: Update with new nxstyle options
Code was flawed in that the Pins are defined with the
pullups in the definition. Since there are no alterntes pins
there is no way to remove them. So not enabling the CONFIG
pull up did nothing as did enabling them.
Code also ignored the use of D0 for ready detection causing
3X+ the chatter.
This is now a compile time feature as there was no reason for
it to be a run time. It wasted both flash and ram.
Squashed commit of the following:
Author: Gregory Nutt <gnutt@nuttx.org>
Ran nxstyle against many of the affected files. But this job was too big for today. Many of the network drivers under arch are highly non-compiant and generate many, many faults from nxstyle. Those will have to be visited again another day.
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
This effects all network drivers as well as timing related portions of net/: devif_poll_tcp_timer shouldn't be skipped in the multiple card case. devif_timer will be called multiple time in one period if the multiple card exist, the elapsed time calculated for the first callback is right, but the flowing callback in the same period is wrong(very short) because the global variable g_polltimer is used in the calculation. So let's pass the delay time to devif_timer and remove g_polltimer.
Squashed commit of the following:
Author: Gregory Nutt <gnutt@nuttx.org>
net/: Trivial changes to PR from review. Biggest difference: type of s_error changed to int16_t to save a byte or two.
Author: liuhuahang <liuhuahang@xiaomi.com>
Implement SO_ERROR for getsockopt()
Fix fe310 signal handling
* arch: fe310: Disable all interrupts in mie at __start
* arch: fe310: Fix up_irq_enable() to set external interrupt only
* arch: fe310: Fix up_schedule_sigaction() to save REG_INT_CTX
* boards: hifive1-revb: Adjust stack size to reduce runtime memory
Approved-by: Gregory Nutt <gnutt@nuttx.org>