SAM3S8/SD8 Software Package: examples_usb/usb_hid_mouse/main.c File Reference

SAM3S8/SD8 Software Package 1.2
Defines | Functions | Variables

# main.c File Reference

`#include "board.h"`
`#include "USBD.h"`
`#include "HIDDMouseDriver.h"`
`#include <string.h>`
`#include <stdbool.h>`
`#include <stdint.h>`

Go to the source code of this file.

## Defines

#define | SPEED_X 4
#define | SPEED_Y 4
#define | JOYSTICK_LEFT 0
#define | JOYSTICK_RIGHT 1

## Functions

void | USBDCallbacks_Initialized (void)
void | USBDCallbacks_RequestReceived (const USBGenericRequest *request)
void | USBDDriverCallbacks_ConfigurationChanged (uint8_t cfgnum)
int | main (void)

## Variables

USBDDriverDescriptors | hiddMouseDriverDescriptors

## Detailed Description

This file contains all the specific code for the usb_hid_mouse

## Contents

The code can be roughly broken down as follows:

- Configuration functions
  - VBus_Configure
  - PIO & Timer configurations in start of main
- Interrupt handlers
  - ISR_Vbus
- The main function, which implements the program behavior

Definition in file main.c.

## Define Documentation

#define SPEED_X 4

Speed of pointer movement X

Definition at line 134 of file main.c.

#define SPEED_Y 4

Speed of pointer movement Y

Definition at line 137 of file main.c.

## Function Documentation

int main | ( | void | ) |

usb_hid_mouse application entry.

Initializes the system and then monitors buttons, sending the corresponding character when one is pressed.

Definition at line 309 of file main.c.

Here is the call graph for this function:

void USBDDriverCallbacks_ConfigurationChanged | ( | uint8_t | cfgnum ) |

Invoked when the configuration of the device changes. Start reading output reports.

Parameters:

  cfgnum | New configuration number.

Definition at line 275 of file main.c.

Here is the call graph for this function:
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines