This reverts commit 62c15c03d3.
Fix warning: the choice symbol STM32_FLASH_CONFIG_G (defined at arch/arm/src/stm32/Kconfig:1275) is selected by the following symbols, but select/imply has no effect on choice symbols
- ARCH_CHIP_STM32F412ZG (defined at arch/arm/src/stm32/Kconfig:1014)
The original code hard-coded card detection to the low when card is
inserted and high when not. This might not be true on every board
because it depends on the slot and wiring used. The second reason is
because it is also possible to detect card with D3 pin pull-up when the
slot does not provide dedicated card detection switch.
This introduces new argument to the sam_hsmci_initialize to allow
invert of card detection pin. It also applies this invert to existing
boards as that was the state up to this point.
Generic drivers shoud not use architecture related config options like
CONFIG_SAMV7_PWM. This commit adds PWM pin overwrite under generic
configuration option CONFIG_PWM_OVERWRITE.
Now the overwrite can be used on other architectures as well or can be
completely disabled for SAMv7.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
This commit adds configuration file with enabled MCAN support. This is
mainly to track changes in architectural driver that could cause build
errors.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
Commit d07792a caused a build error in sam_mcan.c file. This commit fixes
the build. The file now succesfully compiles and CAN works.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
POSIX dictates that assert() terminates via abort(), even though in NuttX
abort() just calls exit(EXIT_FAILURE) it is better to use the correct
API here, if at some point a proper implementation for abort() is made.
Also, as the kernel must not use abort() which is a userspace API, direct
the exit to PANIC() if for some reason _assert() returns (it should not
but trap it here just in case).
Remove calls to the userspace API exit() from the kernel. The problem
with doing such calls is that the exit functions are called with kernel
mode privileges which is a big security no-no.
Do not allow a deferred cancellation if the group is exiting, it is too
dangerous to allow the threads to execute any user space code after the
exit has started.
If the cancelled thread is not inside a cancellation point, just kill it
immediately via asynchronous cancellation. This will create far less
problems than allowing it to continue running user code.
For some reason the signal action was never performed if the receiveing
task was within a system call, the pending queue inser was simply missing.
This fixes the issue.
In the Nim language "selectors"(I/O multiplexing) module, the maximum
number of file descriptors is obtained with getrlimit() as follows.
var fdLim: RLimit
var res = int(getrlimit(RLIMIT_NOFILE, fdLim))
if res >= 0:
res = int(fdLim.rlim_cur) - 1
To be able to use the same implementation as other POSIX-based OS,
getrlimit() should return a value.
(For now, let it return 128.)
Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
Purge warning:
Kconfig:249: warning: the 'modules' option is not supported.
Let me know if this is a problem for you, as it wouldn't be that
hard to implement. Note that modules are supported -- Kconfiglib
just assumes the symbol name MODULES, like older versions of the
C implementation did when 'option modules' wasn't used.
Signed-off-by: chao an <anchao@xiaomi.com>
mmcsd_removed will be called if the card is in invalid state.
This can happen if the card is bad, or vibrations causes a power
loss.
mmcsd_removed resets:
priv->capacity = 0; /* Capacity=0 sometimes means no media */
priv->blocksize = 0;
priv->probed = false;
priv->mediachanged = false;
priv->wrbusy = false;
priv->type = MMCSD_CARDTYPE_UNKNOWN;
priv->rca = 0;
priv->selblocklen = 0;
priv->widebus = false;
If blocksize is set to 0 will cause the log2 to result
in an infinate loop in some drivers.
IS_EMPTY will check for priv->type = MMCSD_CARDTYPE_UNKNOWN
and return ENODEV.
In the lower half UART driver for PIC32MZ architecture, adding the
TIOCxBRK ioctl calls, which allow an application to transmit a UART
line BREAK signal.
This architecture does not support BSD-style BREAK in hardware so our
implementation follows the precedent set in STM32, GD32, and Kinetis
architectures: By default, if only PIC32MZ_UART_BREAKS is configured,
we produce the hardware-native BREAK, which lasts for 12 bit lengths;
if, in addition, PIC32MZ_SERIALBRK_BSDCOMPAT is configured, we
generate a BSD-style BREAK by putting the TX pin in GPIO mode and
driving it low "manually" until told to stop.
* arch/mips/src/pic32mz/Kconfig
(config PIC32MZ_UART_BREAKS): New. Appears as
CONFIG_PIC32MZ_UART_BREAKS in code.
(config PIC32MZ_SERIALBRK_BSDCOMPAT): New. Appears as
CONFIG_PIC32MZ_SERIALBRK_BSDCOMPAT in code.
* arch/mips/src/pic32mz/hardware/pic32mz_pps.h
(__PPS_OUTPUT_REGADDR_TO_GPIO, PPS_OUTPUT_REGADDR_TO_GPIO): New
macros to automatically determine the GPIO port and pin from the
corresponding PPS (Peripheral Pin Select) define. Since there is a
one-to-one correspondence between PPS output mappings and a single
port and pin, these macros avoid writing redundant pin mappings. We
use this when switching the TX pin from UART to GPIO to generate
the BREAK and we could use it in other peripheral drivers in the
future to override hardware behavior.
* arch/mips/src/pic32mz/pic32mz_serial.c
(struct up_dev_s): Add new field 'brk' to indicate line break in
progress when built with PIC32MZ_UART_BREAKS. If generating BSD-
compatible BREAKs, also add tx_gpio, tx_pps_reg, and tx_pps_val, to
let us toggle the pin between UART and GPIO modes.
(up_ioctl): Add cases for TIOCSBRK and TIOCCBRK to turn BREAK on and
off, with both hardware-native and BSD-compatible implementations.
This is similar to the STM32F7 implementation.
(up_txint): Block enabling TX interrupt if line break in progress.
This is similar to the STM32F7 implementation.