Skip to content

Commit

Permalink
v1.30
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemccauley authored and ruslansk committed May 20, 2017
1 parent bcc7a21 commit 211b589
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
20 changes: 10 additions & 10 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for bcm2835 1.29.
# Generated by GNU Autoconf 2.69 for bcm2835 1.30.
#
# Report bugs to <[email protected]>.
#
Expand Down Expand Up @@ -579,8 +579,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='bcm2835'
PACKAGE_TARNAME='bcm2835'
PACKAGE_VERSION='1.29'
PACKAGE_STRING='bcm2835 1.29'
PACKAGE_VERSION='1.30'
PACKAGE_STRING='bcm2835 1.30'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_URL=''

Expand Down Expand Up @@ -1223,7 +1223,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.29 to adapt to many kinds of systems.
\`configure' configures bcm2835 1.30 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1289,7 +1289,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of bcm2835 1.29:";;
short | recursive ) echo "Configuration of bcm2835 1.30:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1377,7 +1377,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
bcm2835 configure 1.29
bcm2835 configure 1.30
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1478,7 +1478,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.29, which was
It was created by bcm2835 $as_me 1.30, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -2305,7 +2305,7 @@ fi
# Define the identity of the package.
PACKAGE='bcm2835'
VERSION='1.29'
VERSION='1.30'
cat >>confdefs.h <<_ACEOF
Expand Down Expand Up @@ -4730,7 +4730,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.29, which was
This file was extended by bcm2835 $as_me 1.30, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -4796,7 +4796,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
bcm2835 config.status 1.29
bcm2835 config.status 1.30
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Expand Down
2 changes: 1 addition & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dnl
dnl $Id: configure.in,v 1.1 2012/12/01 22:56:52 mikem Exp mikem $
dnl (C) 2012 Mike McCauley ([email protected])

AC_INIT([bcm2835], [1.29], [[email protected]])
AC_INIT([bcm2835], [1.30], [[email protected]])

AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE()
Expand Down
10 changes: 5 additions & 5 deletions src/bcm2835.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,14 +492,14 @@ uint8_t bcm2835_spi_transfer(uint8_t value)

// Maybe wait for TXD
while (!(bcm2835_peri_read(paddr) & BCM2835_SPI0_CS_TXD))
delayMicroseconds(10);
;

// Write to FIFO, no barrier
bcm2835_peri_write_nb(fifo, value);

// Wait for DONE to be set
while (!(bcm2835_peri_read_nb(paddr) & BCM2835_SPI0_CS_DONE))
delayMicroseconds(10);
;

// Read any byte that was sent back by the slave while we sere sending to it
uint32_t ret = bcm2835_peri_read_nb(fifo);
Expand Down Expand Up @@ -531,21 +531,21 @@ void bcm2835_spi_transfernb(char* tbuf, char* rbuf, uint32_t len)
{
// Maybe wait for TXD
while (!(bcm2835_peri_read(paddr) & BCM2835_SPI0_CS_TXD))
delayMicroseconds(10);
;

// Write to FIFO, no barrier
bcm2835_peri_write_nb(fifo, tbuf[i]);

// Wait for RXD
while (!(bcm2835_peri_read(paddr) & BCM2835_SPI0_CS_RXD))
delayMicroseconds(10);
;

// then read the data byte
rbuf[i] = bcm2835_peri_read_nb(fifo);
}
// Wait for DONE to be set
while (!(bcm2835_peri_read_nb(paddr) & BCM2835_SPI0_CS_DONE))
delayMicroseconds(10);
;

// Set TA = 0, and also set the barrier
bcm2835_peri_set_bits(paddr, 0, BCM2835_SPI0_CS_TA);
Expand Down
4 changes: 3 additions & 1 deletion src/bcm2835.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,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.29.tar.gz
/// from http://www.airspayce.com/mikem/bcm2835/bcm2835-1.30.tar.gz
/// You can find the latest version at http://www.airspayce.com/mikem/bcm2835
///
/// Several example programs are provided.
Expand Down Expand Up @@ -281,6 +281,8 @@
/// \version 1.28 Fixed a problem where bcm2835_spi_writenb() would have problems with transfers of more than
/// 64 bytes dues to read buffer filling. Patched by Peter Würtz.
/// \version 1.29 Further fix to SPI from Peter Würtz.
/// \version 1.30 10 microsecond delays from bcm2835_spi_transfer and bcm2835_spi_transfern for
/// significant performance improvements, Patch by Alan Watson.
/// \author Mike McCauley ([email protected]) DO NOT CONTACT THE AUTHOR DIRECTLY: USE THE LISTS


Expand Down

0 comments on commit 211b589

Please sign in to comment.