From a21c122435b22457399624a60dbca442d0c3588e Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Sat, 25 Apr 2009 13:24:58 +0200 Subject: * digital/avr/modules/isp: - added user callbacks. - removed incomplete watchdog support. --- digital/avr/modules/isp/test/avrconfig.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'digital/avr/modules/isp/test/avrconfig.h') diff --git a/digital/avr/modules/isp/test/avrconfig.h b/digital/avr/modules/isp/test/avrconfig.h index daabef56..3ddf50fa 100644 --- a/digital/avr/modules/isp/test/avrconfig.h +++ b/digital/avr/modules/isp/test/avrconfig.h @@ -25,6 +25,11 @@ * * }}} */ +/* utils */ +/** AVR Frequency : 1000000, 1843200, 2000000, 3686400, 4000000, 7372800, + * 8000000, 11059200, 14745600, 16000000, 18432000, 20000000. */ +#define AC_FREQ 8000000 + /* isp - ISP module. */ /** Size of isp_frame buffer. */ #define AC_ISP_FRAME_BUFFER_SIZE 275 @@ -32,7 +37,7 @@ #define AC_ISP_FRAME_SEND_CHAR uart0_putc /** Should be implemented by the user (isp_proto) to accept a frame. */ #define AC_ISP_FRAME_ACCEPT_FRAME isp_proto_accept -/** Should be implemeted by the user to send a frame. */ +/** Should be implemented by the user to send a frame. */ #define AC_ISP_PROTO_SEND isp_frame_send_frame /** Programmer signature. */ #define AC_ISP_PROTO_SIGNATURE "APBisp_2" @@ -42,5 +47,21 @@ #define AC_ISP_PROTO_HW_VERSION 0x02 /** Programmer software version. */ #define AC_ISP_PROTO_SW_VERSION 0x0204 +/** Should be implemented by the user to enable SPI programming: + * - set RESET and SCK to low, + * - power on, or if not possible, do a positive RESET pulse, + * - enable SPI. */ +#define AC_ISP_SPI_ENABLE isp_spi_enable +/** Should be implemented by the user to disable SPI programming: + * - disable SPI, + * - release RESET, + * - power off if desired. */ +#define AC_ISP_SPI_DISABLE isp_spi_disable +/** Should be implemented by the user to do a pulse on SCK. This is used to + * try to resynchronise. */ +#define AC_ISP_SPI_SCK_PULSE isp_spi_sck_pulse +/** Should be implemented by the user to send and receive a byte using the SPI + * bus. */ +#define AC_ISP_SPI_TX isp_spi_tx #endif /* avrconfig_h */ -- cgit v1.2.3