AT89RFD-11 User Guide
-17
7648A–USB–06/06
Section 4
Firmware Architecture
The firmware of this reference design is written in C language. The main files are
explained below:
• usb_task.c: This file manages the USB enumeration, the SCSI command, the USB
mouse motion (X,Y motion, buttons click, scroll wheel motion) and the USB events
(suspend, resume, reset...)
• usb_enum.c: This file contains the USB endpoint 0 management routines
corresponding to the standard enumeration process (refer to chapter 9 of the USB
specification). This file calls routines of the usb_user_enum.c file for non-standard
request management. The enumeration parameters (descriptor tables) are contained
in the usb_user_configuration.c file.
• usb_user_enum.c: This file contains the non-standard USB requests.
• usb_user_configuration.c: This file contains the enumeration parameters (USB
descriptors)
• sensor.c: This file contains the functions to initialize the sensor and the wheel,
manage the sensor access (read, write) and the wheel motion detection.
• ctrl_access.c: This file manages the interface between the USB and the target
memory using the LUN (Logical Unit Number).
• nf.c: This file contains the high level NF with 2Kb page routines
• nf_mem.c: This file contains the interface routines of Nand Flash memory
• The figure hereunder shows the firmware architecture implementation