Plan 9 from Bell Labs’s /usr/web/sources/contrib/maht/inferno/appl/cmd/stk500/command.m

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


# **** ATMEL AVR - A P P L I C A T I O N   N O T E  ************************;
# *;
# * Title:		AVR068 - STK500 Communication Protocol;
# * Filename:		command.h;
# * Version:		1.0;
# * Last updated:	31.01.2005;
# *;
# * Support E-mail:	avr@atmel.com;
# *;

# converted to Limbo by matt@proweb.co.uk 29/06/2007

# **************************************************************************;

#  *****************[ STK message constants ]***************************;

 MESSAGE_START                      : con 16r1B  ;      # = ESC = 27 decimal;
 TOKEN                              : con 16r0E;

#  *****************[ STK general command constants ]**************************;

 CMD_SIGN_ON                        : con 16r01;
 CMD_SET_PARAMETER                  : con 16r02;
 CMD_GET_PARAMETER                  : con 16r03;
 CMD_SET_DEVICE_PARAMETERS          : con 16r04;
 CMD_OSCCAL                         : con 16r05;
 CMD_LOAD_ADDRESS                   : con 16r06;
 CMD_FIRMWARE_UPGRADE               : con 16r07;


#  *****************[ STK ISP command constants ]******************************;

 CMD_ENTER_PROGMODE_ISP             : con 16r10;
 CMD_LEAVE_PROGMODE_ISP             : con 16r11;
 CMD_CHIP_ERASE_ISP                 : con 16r12;
 CMD_PROGRAM_FLASH_ISP              : con 16r13;
 CMD_READ_FLASH_ISP                 : con 16r14;
 CMD_PROGRAM_EEPROM_ISP             : con 16r15;
 CMD_READ_EEPROM_ISP                : con 16r16;
 CMD_PROGRAM_FUSE_ISP               : con 16r17;
 CMD_READ_FUSE_ISP                  : con 16r18;
 CMD_PROGRAM_LOCK_ISP               : con 16r19;
 CMD_READ_LOCK_ISP                  : con 16r1A;
 CMD_READ_SIGNATURE_ISP             : con 16r1B;
 CMD_READ_OSCCAL_ISP                : con 16r1C;
 CMD_SPI_MULTI                      : con 16r1D;

#  *****************[ STK PP command constants ]*******************************;

 CMD_ENTER_PROGMODE_PP              : con 16r20;
 CMD_LEAVE_PROGMODE_PP              : con 16r21;
 CMD_CHIP_ERASE_PP                  : con 16r22;
 CMD_PROGRAM_FLASH_PP               : con 16r23;
 CMD_READ_FLASH_PP                  : con 16r24;
 CMD_PROGRAM_EEPROM_PP              : con 16r25;
 CMD_READ_EEPROM_PP                 : con 16r26;
 CMD_PROGRAM_FUSE_PP                : con 16r27;
 CMD_READ_FUSE_PP                   : con 16r28;
 CMD_PROGRAM_LOCK_PP                : con 16r29;
 CMD_READ_LOCK_PP                   : con 16r2A;
 CMD_READ_SIGNATURE_PP              : con 16r2B;
 CMD_READ_OSCCAL_PP                 : con 16r2C    ;

 CMD_SET_CONTROL_STACK              : con 16r2D;

#  *****************[ STK HVSP command constants ]*****************************;

 CMD_ENTER_PROGMODE_HVSP            : con 16r30;
 CMD_LEAVE_PROGMODE_HVSP            : con 16r31;
 CMD_CHIP_ERASE_HVSP                : con 16r32;
 CMD_PROGRAM_FLASH_HVSP             : con 16r33;
 CMD_READ_FLASH_HVSP                : con 16r34;
 CMD_PROGRAM_EEPROM_HVSP            : con 16r35;
 CMD_READ_EEPROM_HVSP               : con 16r36;
 CMD_PROGRAM_FUSE_HVSP              : con 16r37;
 CMD_READ_FUSE_HVSP                 : con 16r38;
 CMD_PROGRAM_LOCK_HVSP              : con 16r39;
 CMD_READ_LOCK_HVSP                 : con 16r3A;
 CMD_READ_SIGNATURE_HVSP            : con 16r3B;
 CMD_READ_OSCCAL_HVSP               : con 16r3C;

#  *****************[ STK status constants ]***************************;

#  Success;
 STATUS_CMD_OK                      : con 16r00;

#  Warnings;
 STATUS_CMD_TOUT                    : con 16r80;
 STATUS_RDY_BSY_TOUT                : con 16r81;
 STATUS_SET_PARAM_MISSING           : con 16r82;

#  Errors;
 STATUS_CMD_FAILED                  : con 16rC0;
 STATUS_CKSUM_ERROR                 : con 16rC1;
 STATUS_CMD_UNKNOWN                 : con 16rC9;

#  *****************[ STK parameter constants ]***************************;
 PARAM_BUILD_NUMBER_LOW             : con 16r80;
 PARAM_BUILD_NUMBER_HIGH            : con 16r81;
 PARAM_HW_VER                       : con 16r90;
 PARAM_SW_MAJOR                     : con 16r91;
 PARAM_SW_MINOR                     : con 16r92;
 PARAM_VTARGET                      : con 16r94;
 PARAM_VADJUST                      : con 16r95;
 PARAM_OSC_PSCALE                   : con 16r96;
 PARAM_OSC_CMATCH                   : con 16r97;
 PARAM_SCK_DURATION                 : con 16r98;
 PARAM_TOPCARD_DETECT               : con 16r9A;
 PARAM_STATUS                       : con 16r9C;
 PARAM_DATA                         : con 16r9D;
 PARAM_RESET_POLARITY               : con 16r9E;
 PARAM_CONTROLLER_INIT              : con 16r9F;

#  *****************[ STK answer constants ]***************************;

 ANSWER_CKSUM_ERROR                 : con 16rB0;


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.