diff --git a/ap105-flash b/ap105-flash index fe532bb..33be2e9 100755 --- a/ap105-flash +++ b/ap105-flash @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e @@ -7,8 +7,9 @@ if [ -z "${SN}" ] ; then echo A non empty serial number is required as first argument fi +SPEED=${SPEED=16500} CHIP="MX25L12835F/MX25L12845E/MX25L12865E/MX25L12873F" -DEV="linux_spi:dev=/dev/spidev0.0,spispeed=16500" +DEV="linux_spi:dev=/dev/spidev0.0,spispeed=${SPEED}" echo "Testing for a flash chip" flashrom -p ${DEV} -c ${CHIP}