nRF51 SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

ADNS2080 Mouse Sensor Driver Application main file. More...

Macros

#define MOTION_INTERRUPT_PIN_NUMBER   (26)
 
#define MOUSE_MOVEMENT_THRESHOLD   (10)
 

Functions

static void gpiote_init (void)
 Function for initializing the GPIO Tasks/Events peripheral.
 
void GPIOTE_IRQHandler (void)
 Function for handling the GPIOTE interrupt. Triggered on motion interrupt pin input low-to-high transition.
 
int main (void)
 Function for application main entry.
 

Variables

static int16_t m_delta_x = 0
 
static int16_t m_delta_y = 0
 
static bool volatile motion_interrupt_detected = false
 

Detailed Description

This file contains the source code for an application using ADNS2080 mouse sensor driver.

Macro Definition Documentation

#define MOTION_INTERRUPT_PIN_NUMBER   (26)

Pin number used for ADNS2080 motion interrupt. If you change this, you must change the pin configuration in the main function.

#define MOUSE_MOVEMENT_THRESHOLD   (10)

Deadzone for mouse movement before LEDs are lit.

Variable Documentation

int16_t m_delta_x = 0
static

Variable to store mouse X-axis movement deltas.

int16_t m_delta_y = 0
static

Variable to store mouse Y-axis movement deltas.

bool volatile motion_interrupt_detected = false
static

If set, motion interrupt has occurred. Clear after reading.