Chameleon-AVR Nurve Networks, Chameleon-AVR Datasheet - Page 201

MCU, MPU & DSP Development Tools AVR8 & PROPELLER DEV SYSTEM (SBC)

Chameleon-AVR

Manufacturer Part Number
Chameleon-AVR
Description
MCU, MPU & DSP Development Tools AVR8 & PROPELLER DEV SYSTEM (SBC)
Manufacturer
Nurve Networks
Datasheet

Specifications of Chameleon-AVR

Processor To Be Evaluated
AVR 328P
Data Bus Width
8 bit
Interface Type
USB, VGA, PS/2, I2C, ISP, SPI
Operating Supply Voltage
3.3 V, 5 V
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
However, I only exposed a portion of its abilities thru the current SPI messages, no need to waste messages. You can
always add more. Therefore, the abilities you see exposed in the following API are just a taste of what it can do. In other
words, if you need more functions that the driver supports then you will have to add messages to the SPI driver and add
them yourself.
With that in mind, if you want to use the mouse driver then you need the following files added to your project:
25.1 A Brief Mouse Primer
Mice typically have two axes and a number of buttons. The two axes (X and Y) are decoded as they move either
mechanically (roller mice) or optically. Inside the mouse is a microprocessor that actually handles all the decoding and
sending of the information. There are two ways that mice send messages; absolute and relative. In absolute mode, the X-
Y position is accumulated, and in relative mode, the mouse sends the current change from the last positions. Additionally,
mouse have “sensitivity” settings that you can control that slow or speed the relative mouse message values to the
surface they are moving on. Finally, some mice have a “Z-axis” which is usually the scrub wheel, this is just like the X-Y.
Finally, the mice have a number of buttons, these are encoded by the mouse as simple switches. There is a whole mouse
message API that most mice respond to, but for our purposes we will let the Propeller driver deal with it. All our API needs
to do is call the driver over the SPI link, get absolute, relative, position and the buttons – simple.
25.2 Header File Contents Overview
The “Mouse” module header CHAM_MOUSE_DRV_V010.h actually has nothing in it once again (I told you this stuff was
easy!). However, the mouse does use a data structure located in the global system file CHAM_AVR_SYSTEM_V010.h,
the data structure is shown below:
Its nice to think of input devices in all the same way and thus wrap a “container” around them. This data structure was
created with that in mind for future expansion. So all mouse messages use this container. The first ints are the x,y
position, the 3
the mouse up to 5 different standard buttons.
25.3 API Listing Reference
The API listing for the “Mouse” module CHAM_MOUSE_DRV_V010.c is listed in Table 25.1 categorized by functionality.
Function Name
Mouse Driver Control
int Mouse_Load(void);
int Mouse_Unload(void);
CHAM_AVR_MOUSE_DRV_V010.c
CHAM_AVR_MOUSE_DRV_V010.h
rd
(Z) is usually the scrub wheel. The next int, buttons is a bit encoded representation of all the buttons on
Table 25.1 – “Mouse” module API functions listing.
- Main C file source for “Mouse” module.
- Header file for “Mouse” module.
Description
Loads the mouse driver.
Unloads the mouse driver.
© 2009 NURVE NETWORKS LLC “Exploring the Chameleon AVR 8-Bit”
201

Related parts for Chameleon-AVR