Compare commits
1 Commits
bcm2835-1.
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
87dc810e14
|
20
configure
vendored
20
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.71 for bcm2835 1.74.
|
||||
# Generated by GNU Autoconf 2.71 for bcm2835 1.75.
|
||||
#
|
||||
# Report bugs to <mikem@airspayce.com>.
|
||||
#
|
||||
@@ -610,8 +610,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='bcm2835'
|
||||
PACKAGE_TARNAME='bcm2835'
|
||||
PACKAGE_VERSION='1.74'
|
||||
PACKAGE_STRING='bcm2835 1.74'
|
||||
PACKAGE_VERSION='1.75'
|
||||
PACKAGE_STRING='bcm2835 1.75'
|
||||
PACKAGE_BUGREPORT='mikem@airspayce.com'
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1274,7 +1274,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures bcm2835 1.74 to adapt to many kinds of systems.
|
||||
\`configure' configures bcm2835 1.75 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1341,7 +1341,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of bcm2835 1.74:";;
|
||||
short | recursive ) echo "Configuration of bcm2835 1.75:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1437,7 +1437,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
bcm2835 configure 1.74
|
||||
bcm2835 configure 1.75
|
||||
generated by GNU Autoconf 2.71
|
||||
|
||||
Copyright (C) 2021 Free Software Foundation, Inc.
|
||||
@@ -1560,7 +1560,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by bcm2835 $as_me 1.74, which was
|
||||
It was created by bcm2835 $as_me 1.75, which was
|
||||
generated by GNU Autoconf 2.71. Invocation command line was
|
||||
|
||||
$ $0$ac_configure_args_raw
|
||||
@@ -2823,7 +2823,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='bcm2835'
|
||||
VERSION='1.74'
|
||||
VERSION='1.75'
|
||||
|
||||
|
||||
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
|
||||
@@ -5866,7 +5866,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by bcm2835 $as_me 1.74, which was
|
||||
This file was extended by bcm2835 $as_me 1.75, which was
|
||||
generated by GNU Autoconf 2.71. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -5934,7 +5934,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config='$ac_cs_config_escaped'
|
||||
ac_cs_version="\\
|
||||
bcm2835 config.status 1.74
|
||||
bcm2835 config.status 1.75
|
||||
configured by $0, generated by GNU Autoconf 2.71,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ dnl (C) 2012 Mike McCauley (mikem@airspayce.com)
|
||||
|
||||
dnl Dont forget to update BCM2835_VERSION and .tar.gz in bcm2835.h
|
||||
dnl and the zip file.
|
||||
AC_INIT([bcm2835], [1.74], [mikem@airspayce.com])
|
||||
AC_INIT([bcm2835], [1.75], [mikem@airspayce.com])
|
||||
|
||||
AC_CONFIG_HEADERS(config.h:config.h.in)
|
||||
AM_INIT_AUTOMAKE()
|
||||
|
||||
@@ -1109,7 +1109,8 @@ void bcm2835_aux_spi_transfernb(const char *tbuf, char *rbuf, uint32_t len) {
|
||||
|
||||
while ((tx_len > 0) || (rx_len > 0)) {
|
||||
|
||||
while (!(bcm2835_peri_read(stat) & BCM2835_AUX_SPI_STAT_TX_FULL) && (tx_len > 0)) {
|
||||
while (!(bcm2835_peri_read(stat) & BCM2835_AUX_SPI_STAT_TX_FULL) && (tx_len > 0) && (tx_len + BCM2835_AUX_SPI_FIFO_SIZE * 3 > rx_len))
|
||||
{
|
||||
count = MIN(tx_len, 3);
|
||||
data = 0;
|
||||
|
||||
@@ -1129,7 +1130,8 @@ void bcm2835_aux_spi_transfernb(const char *tbuf, char *rbuf, uint32_t len) {
|
||||
|
||||
}
|
||||
|
||||
while (!(bcm2835_peri_read(stat) & BCM2835_AUX_SPI_STAT_RX_EMPTY) && (rx_len > 0)) {
|
||||
while (!(bcm2835_peri_read(stat) & BCM2835_AUX_SPI_STAT_RX_EMPTY) && (rx_len > 0))
|
||||
{
|
||||
count = MIN(rx_len, 3);
|
||||
data = bcm2835_peri_read(io);
|
||||
|
||||
@@ -1151,7 +1153,8 @@ void bcm2835_aux_spi_transfernb(const char *tbuf, char *rbuf, uint32_t len) {
|
||||
rx_len -= count;
|
||||
}
|
||||
|
||||
while (!(bcm2835_peri_read(stat) & BCM2835_AUX_SPI_STAT_BUSY) && (rx_len > 0)) {
|
||||
while (!(bcm2835_peri_read(stat) & BCM2835_AUX_SPI_STAT_BUSY) && (rx_len > 0) && (tx_len == 0))
|
||||
{
|
||||
count = MIN(rx_len, 3);
|
||||
data = bcm2835_peri_read(io);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
BCM 2835).
|
||||
|
||||
The version of the package that this documentation refers to can be downloaded
|
||||
from http://www.airspayce.com/mikem/bcm2835/bcm2835-1.74.tar.gz
|
||||
from http://www.airspayce.com/mikem/bcm2835/bcm2835-1.75.tar.gz
|
||||
You can find the latest version at http://www.airspayce.com/mikem/bcm2835
|
||||
|
||||
Several example programs are provided.
|
||||
@@ -218,6 +218,15 @@
|
||||
- P1-40 (CLK)
|
||||
- P1-36 (CE2)
|
||||
|
||||
Caution: The bcm2835 library works directly on the SPI/I2C devices. It is not using
|
||||
any Linux device drivers. When relevant Linux drivers are loaded or
|
||||
activated then it can create unexpected behavior from other software like
|
||||
'i2cdetect'.
|
||||
|
||||
Here is a simple utility which detects I2C bus devices with the bcm2835
|
||||
library.
|
||||
https://github.com/gavinlyonsrepo/RPI_Tools/tree/main/src/i2cdetect
|
||||
|
||||
\par I2C Pins
|
||||
|
||||
The bcm2835_i2c_* functions allow you to control the BCM 2835 BSC interface,
|
||||
@@ -631,6 +640,11 @@
|
||||
\version 1.74
|
||||
Timeout in bcm2835_i2c_write() increased by a factor of 10 because some users have reported spurious timeouts at slow speeds.
|
||||
|
||||
\version 1.75
|
||||
Patches to bcm2835_aux_spi_transfernb() from Sean Goff to deal with the case where
|
||||
the process is interrupted between filling the TX FIFO and reading the RX FIFO.
|
||||
|
||||
|
||||
\author Mike McCauley DO NOT CONTACT THE AUTHOR DIRECTLY: USE THE LISTS
|
||||
*/
|
||||
|
||||
@@ -646,7 +660,7 @@
|
||||
/* Needed to compile with gcc -std=c99, as reported by John Blaiklock.*/
|
||||
#include <fcntl.h>
|
||||
|
||||
#define BCM2835_VERSION 10074 /* Version 1.74 */
|
||||
#define BCM2835_VERSION 10075 /* Version 1.75 */
|
||||
|
||||
// Define this if you want to use libcap2 to determine if you have the cap_sys_rawio capability
|
||||
// and therefore the capability of opening /dev/mem, even if you are not root.
|
||||
@@ -1217,6 +1231,7 @@ typedef enum
|
||||
#define BCM2835_BSC_S_TA 0x00000001 /*!< Transfer Active */
|
||||
|
||||
#define BCM2835_BSC_FIFO_SIZE 16 /*!< BSC FIFO size */
|
||||
#define BCM2835_AUX_SPI_FIFO_SIZE 4
|
||||
|
||||
/*! \brief bcm2835I2CClockDivider
|
||||
Specifies the divider used to generate the I2C clock from the system clock.
|
||||
|
||||
Reference in New Issue
Block a user