#define MOUSE_STATUS_REG 0x01 /*!< Product ID, Mouse state of Asleep or Awake */
#define MOUSE_DELTA_Y_REG 0x02 /*!< Y Movement */
#define MOUSE_DELTA_X_REG 0x03 /*!< X Movement */
#define MOUSE_SQUAL_REG 0x04 /*!< Measure of the number of features visible by the sensor */
#define MOUSE_MAX_PIXEL_REG 0x05 /*!< Maximum Pixel value in current frame.*/
#define MOUSE_MIN_PIXEL_REG 0x06 /*!< Minimum Pixel value in current frame.*/
#define MOUSE_PIXEL_SUM_REG 0x07 /*!< This register is used to find the average pixel value.*/
#define MOUSE_PIXEL_DATA_REG 0x08 /*!< Actual picture of surface */
#define MOUSE_SHUTTER_UPPER_REG 0x09 /*!< The sensor adjusts the shutter to keep the average and maximum pixel values within normal operating ranges.*/
#define MOUSE_SHUTTER_LOWER_REG 0x0A /*!< The sensor adjusts the shutter to keep the average and maximum pixel values within normal operating ranges.*/
#define MOUSE_INVERSE_PRODUCT_ID_REG 0x11 /*!< Inverse Product ID */
#define MOUSE_STATUS_REG 0x41 /*!< Product ID, Mouse state of Asleep or Awake */
#define MOUSE_DELTA_Y_REG 0x42 /*!< Y Movement */
#define MOUSE_DELTA_X_REG 0x43 /*!< X Movement */
#define MOUSE_SQUAL_REG 0x44 /*!< Measure of the number of features visible by the sensor */
#define MOUSE_MAX_PIXEL_REG 0x45 /*!< Maximum Pixel value in current frame.*/
#define MOUSE_MIN_PIXEL_REG 0x46 /*!< Minimum Pixel value in current frame.*/
#define MOUSE_PIXEL_SUM_REG 0x47 /*!< This register is used to find the average pixel value.*/
#define MOUSE_PIXEL_DATA_REG 0x48 /*!< Actual picture of surface */
#define MOUSE_SHUTTER_UPPER_REG 0x49 /*!< The sensor adjusts the shutter to keep the average and maximum pixel values within normal operating ranges.*/
#define MOUSE_SHUTTER_LOWER_REG 0x4A /*!< The sensor adjusts the shutter to keep the average and maximum pixel values within normal operating ranges.*/
#define MOUSE_FRAME_PERIOD_REG 0x4B /*!< The frame period counter counts up until it overflows. */
#endif
// Unsere Pins vom Maussensor
#define MAUS_DDR DDRC // Die M<>use h<>ngen am DDRC
#define MAUS_PORT PORTC
#define MAUS_PIN PINC
#define MAUS0_SDA 4
#define MAUS0_SCK 6
#define MAUS1_SDA 5
#define MAUS1_SCK 7
// Konstanten f<>rs intialisieren
#define MAUSSENSOR0 0
#define MAUSSENSOR1 1
classMaussensor
{
private:
// Pins, an denen der Maussensor angeschlossen ist
intsda_pin;
intsck_pin;
/*!
*InitialisiereMaussensor
*/
voidmaus_sens_init(void);
/*!
*SchickteinLesekommandoandenSensor
*undliesteinBytezurueck
*@paramadrdieAdresse
*@returndasDatum
*/
uint8maus_sens_read(uint8adr);
uint8maus_sens_readByte();
/*! Stellt sicher, dass der Maussensor nicht mehr die serielle Datenleitung treibt */