Library provided by Embedded Systems Academy, Copyright 2000 Visit www.esacademy.com/faq/progs for examples and libraries. This library: RX2IAPLIB - name of application: RX2IAPLIBExample ==================================================== C compatible In-Application Programming Library for the Philips 89C51Rx2 Family Hardware requirements ===================== Phytec RDK Rx2 with Philips Rx2 Software requirements ===================== Phytec Flash Tools (part of RDK Rx2) www.phytec.com Raisonance 8051 compiler system - EVAL version sufficient www.raisonance.com or Keil 8051 Compiler System - EVAL version sufficient www.keil.com Optional: Development Assistant-C by RistanCASE www.ristancase.ch Tested using ============ Raisonance 51 Toolset version 6.1.1 Keil C51 Toolset version 6.00 Application description ============================================= Raisonance specific files have their names prefixed with 'r'. Keil specific files have their names prefixed with 'k'. The same source files are used for both compilers. The RX2IAPLIB is an In-Application Programming library for the Rx2 family which may be used with a C project. The library is implemented in assembler, but has a C interface hiding the assembler from the C programmer. The package includes the library, a C header file, a manual in PDF format and an example project for both the Raisonance and Keil 8051 Compilers. The following functions are implemented in the library, giving access to all the features of IAP: unsigned char iap_read_manufacturer_id(void); void iap_init(unsigned char frequency); unsigned char iap_read_device_id(unsigned char id_number); unsigned char iap_read_security_bits(void); void iap_program_security_bits(unsigned char bits); unsigned char iap_program_data_byte(unsigned char val, unsigned int addr); unsigned char iap_read_data_byte(unsigned int addr); void iap_erase_block(unsigned char block); void iap_erase_chip(void); unsigned char iap_read_boot_vector(void); unsigned char iap_read_status_byte(void); void iap_erase_boot_vector_status_byte(void); void iap_program_status_byte(unsigned char status_byte); void iap_program_boot_vector(unsigned char boot_vector);