Commit Graph

68 Commits

Author SHA1 Message Date
Sebastian Huber
2c64cf1bd8 dev/serial/sc16is752-spi: Fix warnings
Fix several may be used uninitialized warnings.
2024-11-12 16:21:20 +00:00
Aaron Nyholm
87c725b6ed flashdev: Add sector IOCTLs
Added new IOCTLs to flashdev to get sector info.
Updated flashdev shell command and flashdev test with new IOCTLs.
2024-11-06 22:35:20 +00:00
Sebastian Huber
ce1fb41a6c kvprintf(): Fix '+' conversion handling
For example, printf("%+i", 1) prints "+1".  However, kvprintf() did
print just "1" for this example.  According to PRINTF(3):

  A sign must always be placed before a number produced by a signed
  conversion.

For "%+r" radix conversions, keep the "+" handling as it is, since this
is a non-standard conversion.  For "%+p" pointer conversions, continue
to ignore the sign modifier to be in line with libc.

This change allows to support the ' conversion modifier in the future.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1310
2024-09-12 23:34:28 +00:00
Sebastian Huber
1e68298847 dev/io: Fix "%hhi" conversion
The signedness of "char" is implementation-dependent.
2024-06-13 17:19:35 +00:00
Sebastian Huber
30125493b5 dev/io: Remove dead code in _IO_Vprintf() 2024-06-13 17:19:35 +00:00
Warner Losh
0c7a972b3c sys: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by:		Netflix
2024-06-13 17:19:35 +00:00
Warner Losh
c2041d3a0b sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2024-06-13 17:19:35 +00:00
Marius Strobl
a9e1c29aa6 kvprintf(9): add missing FALLTHROUGH
Reported by:	Coverity
CID:		1005166
2024-06-13 17:19:35 +00:00
Sebastian Huber
317df86ba3 base64: Move base64 encoding support 2024-02-16 09:32:04 +01:00
Bernd Moessner
a73b52d6a4 flashdev.c: return error if both buffers are NULL
Updates #4981
2024-01-16 10:57:43 -06:00
Bernd Moessner
bd898b503f flashdev: Add missing default case
Updates #4981
2024-01-16 10:57:43 -06:00
Sebastian Huber
527af2b7f2 score: Move formatted I/O functions
These functions do not belong to an super core service.
2023-07-28 11:58:32 +02:00
Gedare Bloom
c1cad595af Revert "cpukit/dev/can: Added CAN support"
This reverts commit cd91b37dce.

Closes #4803.
2023-07-27 12:41:28 -06:00
Gedare Bloom
9e72a793ca Revert "cpukit/dev/can: Resolve warnings in 64bit builds"
This reverts commit 4c0a2d47e1.
2023-07-27 12:23:55 -06:00
Sebastian Huber
c8cae1d82d score: Move _IO_Relax() to new <rtems/dev/io.h>
This function is not a super core service.
2023-07-24 17:51:48 +02:00
Aaron Nyholm
4b209a322e cpukit/flash: Correct erase ioctl address
Previously, the erase ioctl call would ignore flash regions and erase at
the absolute address passed in. This adds a check for if the region is
set and adds the region offset accordingly.
2023-06-27 07:50:40 +10:00
Sebastian Huber
bcef89f236 Update company name
The embedded brains GmbH & Co. KG is the legal successor of embedded
brains GmbH.
2023-05-20 11:05:26 +02:00
Aaron Nyholm
15d4428e96 cpukit/flash: Add API for Flash devices 2023-05-16 12:48:13 +10:00
Kinsey Moore
4c0a2d47e1 cpukit/dev/can: Resolve warnings in 64bit builds
This resolves various gcc warnings in AArch64 LP64 builds of the CAN
framework.
2023-01-30 10:44:24 -06:00
Prashanth S
cd91b37dce cpukit/dev/can: Added CAN support 2022-10-30 09:35:54 +01:00
Joel Sherrill
255fe433fd cpukit/: Scripted embedded brains header file clean up
Updates #4625.
2022-03-10 08:43:49 +01:00
Christian Mauderer
5bb5e01356 i2c: Add non blocking read / write
This adds the possibility to open an I2C bus with O_NONBLOCK (or set it
later via fcntl) to get non-blocking transmissions. This means that if
the bus is busy, a read, write or transfer ioctl will return with a
EAGAIN errno.
2021-06-22 13:51:17 +02:00
Christian Mauderer
b2f265ab9f cpukit/spi: Allow driver specific ioctl
This allows a SPI driver to add a hardware specific ioctl.
2021-01-21 10:17:31 +01:00
Sebastian Huber
80cf60efec Canonicalize config.h include
Use the following variant which was already used by most source files:

  #ifdef HAVE_CONFIG_H
  #include "config.h"
  #endif
2020-04-16 07:30:00 +02:00
Sebastian Huber
62fc148977 dev/sc16is752: Reduce RX FIFO trigger level
This may help to avoid character loss.
2019-08-26 07:24:43 +02:00
Sebastian Huber
aa7b76e98b dev/sc16is752: Set TLS to zero
Ensures that the FCR values are used.
2019-08-26 07:24:43 +02:00
Sebastian Huber
2a2a0fdd95 dev/sc16is752: Do FIFO reset separately 2019-08-26 07:24:43 +02:00
Sebastian Huber
73826b490c dev/sc16is752: Enable enhanced func early 2019-08-26 07:24:43 +02:00
Sebastian Huber
da1b4714f5 dev/sc16is752: Write to right register 2019-08-26 07:24:43 +02:00
Sebastian Huber
2be6ab7f77 dev/sc16is752: Add set/get EFCR IO controls 2019-06-14 07:41:36 +02:00
Sebastian Huber
6ff1da40c7 dev/sc16is752: Add RS485 mode variants 2019-06-14 07:35:21 +02:00
Christian Mauderer
e99847bfc5 dev/sc16is752: Fix parity generation. 2019-02-27 08:51:40 +01:00
Zenon
99d6172f06 Correct minor spelling and grammar errors
This work was performed as a GCI 2018 task.
2018-11-06 18:51:32 -06:00
Sebastian Huber
60c4ba1238 build: Merge dev/Makefile.am 2018-10-09 13:26:47 +02:00
Sebastian Huber
b38887ad22 dev/sc16is752: Deal with a baud of zero
Avoid division by zero and instead disable rx/tx in case of a zero baud
value.  Problem identified by Coverity Scan.
2018-10-05 13:41:06 +02:00
Christian Mauderer
dcaea71741 dev/sc16is752: Add name space for field names.
The field names for the registers generated a name collision (MSR_RI on
the power pc). This patch adds a SC16IS752_ prefix for all field names.

Closes #3501.
2018-08-15 09:48:31 -05:00
Christian Mauderer
c4f5cc5496 dev/sc16is752: Add ioctl calls for modem controll.
This add ths following ioctl calls to the sc16is752 driver:
- TIOCMGET
- TIOCMSET
- TIOCMBIS
- TIOCMBIC
2018-05-14 09:01:33 +02:00
Christian Mauderer
b2e26b7c66 dev/sc16is752: Check return values.
Escalate a failed installation of the interrupts to the next higher
level.
2018-02-12 14:36:29 +01:00
Christian Mauderer
bf7070232f dev/sc16is752: Add GPIO access via ioctl. 2018-02-12 14:36:23 +01:00
Sebastian Huber
36304f3d7a spi: Use self-contained mutex
Update #2843.
2018-02-02 15:01:21 +01:00
Sebastian Huber
dc158ad4ec i2c: Use self-contained mutex
Update #2843.
2018-02-02 15:01:21 +01:00
Chris Johns
05015dc188 Xilinx AXI I2C driver IP race condition causes clock glitch.
Setting the PIRQ to 0 before reading the data produces a short clock pulse.
Moving the write to after reading the data fixes the issue.

Close #3173
2018-02-01 14:59:55 +11:00
Chris Johns
2afb22b7e1 Remove make preinstall
A speciality of the RTEMS build system was the make preinstall step.  It
copied header files from arbitrary locations into the build tree.  The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

* The make preinstall step itself needs time and disk space.

* Errors in header files show up in the build tree copy.  This makes it
  hard for editors to open the right file to fix the error.

* There is no clear relationship between source and build tree header
  files.  This makes an audit of the build process difficult.

* The visibility of all header files in the build tree makes it
  difficult to enforce API barriers.  For example it is discouraged to
  use BSP-specifics in the cpukit.

* An introduction of a new build system is difficult.

* Include paths specified by the -B option are system headers.  This
  may suppress warnings.

* The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step.   All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc.  Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

* cpukit/include

* cpukit/score/cpu/@RTEMS_CPU@/include

* cpukit/libnetworking

The new BSP include directories are:

* bsps/include

* bsps/@RTEMS_CPU@/include

* bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed.  The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.
2018-01-25 08:45:26 +01:00
Sebastian Huber
4cfce5cb64 i2c: Add temperature sensor LM75A driver
Close #3163.
2017-10-02 13:40:46 +02:00
Sebastian Huber
9c063df3ab i2c: Fix EEPROM driver program timeout handling
The RTEMS_MILLISECONDS_TO_TICKS() macro doesn't round up. Do not use it
to calculate the program timeout in ticks. Check program done condition
after the timeout check to account for pre-emptions.

Update #3162.
2017-10-02 13:34:00 +02:00
Sebastian Huber
2e1d595972 i2c: Send MSB of address first for EEPROMs
Update #3161.
2017-10-02 13:34:00 +02:00
Chris Johns
4e0ba7ef6f i2c: TMP112 correct the function name to set the config. 2017-09-11 14:15:51 +10:00
Sebastian Huber
b2ed712d26 Include missing <string.h>
Update #2133.
2017-08-25 10:58:58 +02:00
Sebastian Huber
e062741da6 dev/i2c: Fix integer type
Update #3082.
2017-08-22 14:18:57 +02:00
Chris Johns
849500d0f2 dev/i2c: Add I2C device support for FPGA Slave, LM25066A, TMP112, ADS1113, ADS1114 and ADS1115
Closes #3101.
2017-08-20 10:59:53 +10:00