patch #9816: Implement new programmer type: linuxspi

* linuxspi.c: (New file.)
* linuxspi.h: (New file.)
* Makefile.am: Add new files
* configure.ac: Add "linuxspi" --enable option
* avrdude.conf.in: Add "linuxspi" programmer template
* pgm_type.c: Include linuxspi programmer
* doc/avrdude.texi: Document new programmer
* avrdude.1: (Dito.)

Submitted by Ralf Ramsauer



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1447 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch
2020-09-19 21:32:38 +00:00
parent 9b3762a812
commit 40b0b104d6
10 changed files with 456 additions and 2 deletions

View File

@@ -336,6 +336,18 @@ AC_ARG_ENABLE(
esac],
[enabled_linuxgpio=no])
AC_ARG_ENABLE(
[linuxspi],
AC_HELP_STRING(
[--enable-linuxspi],
[Enable the Linux SPIDEV interface programmer type]),
[case "${enableval}" in
yes) enabled_linuxspi=yes ;;
no) enabled_linuxspi=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for enable-linuxspi option) ;;
esac],
[enabled_linuxspi=no])
DIST_SUBDIRS_AC='doc windows'
if test "$enabled_doc" = "yes"; then
@@ -413,6 +425,14 @@ else
fi
if test "$enabled_linuxspi" = "yes"; then
AC_DEFINE(HAVE_LINUXSPI, 1, [Linux SPI support enabled])
confsubst="$confsubst -e /^@HAVE_LINUXSPI_/d"
else
confsubst="$confsubst -e /^@HAVE_LINUXSPI_BEGIN@/,/^@HAVE_LINUXSPI_END@/d"
fi
# If we are compiling with gcc, enable all warning and make warnings errors.
if test "$GCC" = yes; then
ENABLE_WARNINGS="-Wall"
@@ -590,3 +610,9 @@ else
echo "DISABLED linuxgpio"
fi
if test x$enabled_linuxspi = xyes; then
echo "ENABLED linuxspi"
else
echo "DISABLED linuxspi"
fi