Library provided by Embedded Systems Academy, Copyright 2000 Visit www.esacademy.com/faq/progs for examples and libraries. This library: XAG49IAPLIB - name of application: XAG49IAPLIBExample ================================================================== C compatible In-Application Programming Library for the Philips XA-G49 Microcontroller Hardware requirements ===================== Phytec RDK XA-G49 with Philips XA-G49 Software requirements ===================== Phytec Flash Tools (part of RDK XA-G49) www.phytec.com Raisonance XA compiler system - EVAL version sufficient www.raisonance.com Optional: Development Assistant-C by RistanCASE www.ristancase.ch Tested using ============ Raisonance XA Toolset version 6.1.3 Application description ============================================= The XAG49IAPLIB is an In-Application Programming library for the XA-G49 Microcontroller 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 the Raisonance XA Compiler. The following functions are implemented in the library, giving access to all the features of IAP: void iap_init(unsigned char frequency); unsigned char iap_read_manufacturer_id(void); unsigned char iap_read_device_id(unsigned char id_number); unsigned char iap_read_security_bits(void); unsigned char iap_read_data_byte(unsigned int addr); unsigned int iap_read_boot_pc(void); unsigned int iap_read_boot_psw(void); unsigned char iap_read_status_byte(void); unsigned char iap_erase_block(unsigned char block); void iap_erase_chip(void); unsigned char iap_program_data_byte(unsigned char val, unsigned int addr); unsigned char iap_program_boot_pc(unsigned int boot_pc); unsigned char iap_program_boot_psw(unsigned int boot_psw); unsigned char iap_program_status_byte(unsigned char status_byte); void iap_program_security_bits(unsigned char bits); unsigned char iap_fill_block(unsigned char block); unsigned char iap_erase_boot_psw(void); unsigned char iap_erase_boot_pc(void); unsigned char iap_erase_status_byte(void); unsigned char iap_erase_chip_noreset(void);