pinpad support (4)

This commit is contained in:
NIIBE Yutaka
2011-01-06 17:27:14 +09:00
parent 03393c5247
commit 57859fb417
4 changed files with 43 additions and 29 deletions

35
src/configure vendored
View File

@@ -1,4 +1,4 @@
#! /bin/sh
#! /bin/bash
#
# This file is *NOT* generated by GNU Autoconf, but written by NIIBE Yutaka
@@ -49,13 +49,15 @@ for option; do
-v | --verbose)
verbose=yes ;;
--enable-debug)
debug=yes;;
debug=yes ;;
--disable-debug)
debug=no;;
debug=no ;;
--enable-pinpad)
pinpad=yes;;
pinpad=yes ;;
--enable-pinpad=*)
pinpad=$optarg ;;
--disable-pinpad)
pinpad=no;;
pinpad=no ;;
--with-dfu)
with_dfu=yes ;;
--without-dfu)
@@ -87,7 +89,8 @@ Configuration:
CQ_STARM
STBEE_MINI
--enable-debug debug with virtual COM port [no]
--enable-pinpad PIN input device support [no]
--enable-pinpad={cir,dial}
PIN input device support [no]
--with-dfu build image for DFU [<target specific>]
--with-fsij Use FSIJ serial number [no: random number]
EOF
@@ -162,14 +165,21 @@ else
fi
# --enable-pinpad option
if test "$pinpad" = "yes"; then
PINPAD_MAKE_OPTION="ENABLE_PINPAD=1"
PINPAD_DEFINE="#define PINPAD_SUPPORT 1"
echo "PIN pad option enabled"
else
PINPAD_MAKE_OPTION="# ENABLE_PINPAD=1"
if test "$pinpad" = "no"; then
PINPAD_MAKE_OPTION="# ENABLE_PINPAD="
PINPAD_DEFINE="#undef PINPAD_SUPPORT"
PINPAD_MORE_DEFINE=""
echo "PIN pad option disabled"
elif test "$pinpad" = "yes"; then
PINPAD_MAKE_OPTION="ENABLE_PINPAD=cir"
PINPAD_DEFINE="#define PINPAD_SUPPORT 1"
PINPAD_MORE_DEFINE="#define PINPAD_CIR_SUPPORT 1"
echo "PIN pad option enabled (cir)"
else
PINPAD_MAKE_OPTION="ENABLE_PINPAD=$pinpad"
PINPAD_DEFINE="#define PINPAD_SUPPORT 1"
PINPAD_MORE_DEFINE="#define PINPAD_${pinpad^^[a-z]}_SUPPORT 1"
echo "PIN pad option enabled ($pinpad)"
fi
sed -e "s%@BOARD_MAKEFILE@%$BOARD_MAKEFILE%" \
@@ -181,6 +191,7 @@ sed -e "s/@ORIGIN@/$ORIGIN/" -e "s/@FLASH_SIZE@/$FLASH_SIZE/" \
< gnuk.ld.in > gnuk.ld
sed -e "s/@DEBUG_DEFINE@/$DEBUG_DEFINE/" \
-e "s/@PINPAD_DEFINE@/$PINPAD_DEFINE/" \
-e "s/@PINPAD_MORE_DEFINE@/$PINPAD_MORE_DEFINE/" \
-e "s/@DFU_DEFINE@/$DFU_DEFINE/" \
-e "s/@FSIJ_DEFINE@/$FSIJ_DEFINE/" \
-e "s/@SERIAL_NUMBER_FOUR_BYTES@/$SERIAL_NUMBER_FOUR_BYTES/" \