SAMV71 Xplained Ultra Software Package 1.3

main.c File Reference

#include "board.h"
#include "USBD.h"
#include "HIDDKeyboardDriver.h"
#include "USBD_LEDs.h"
#include <string.h>
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Defines

#define NO_PUSHBUTTON
#define NUM_KEYS   2
#define NUM_NORMAL_KEYS   1
#define NUM_MODIFIER_KEYS   (NUM_KEYS - NUM_NORMAL_KEYS)
#define LED_NUMLOCK   USBD_LEDOTHER

Functions

void USBDCallbacks_RequestReceived (const USBGenericRequest *request)
void USBDDriverCallbacks_ConfigurationChanged (uint8_t cfgnum)
void HIDDKeyboardCallbacks_LedsChanged (uint8_t numLockStatus, uint8_t capsLockStatus, uint8_t scrollLockStatus)
int main (void)

Variables

USBDDriverDescriptors hiddKeyboardDriverDescriptors

Detailed Description

This file contains all the specific code for the usb_hid_keyboard

Contents

The code can be roughly broken down as follows:

Definition in file main.c.


Define Documentation

#define LED_NUMLOCK   USBD_LEDOTHER

Num lock LED index.

Definition at line 139 of file main.c.

#define NUM_KEYS   2

Number of keys used in the example.

Definition at line 130 of file main.c.

#define NUM_MODIFIER_KEYS   (NUM_KEYS - NUM_NORMAL_KEYS)

Number of modifier keys.

Definition at line 136 of file main.c.

#define NUM_NORMAL_KEYS   1

Number of non-modifiers keys.

Definition at line 133 of file main.c.


Function Documentation

void HIDDKeyboardCallbacks_LedsChanged ( uint8_t  numLockStatus,
uint8_t  capsLockStatus,
uint8_t  scrollLockStatus 
)

Invoked when the status of the keyboard LEDs changes. Turns the num. lock LED on or off.

Parameters:
numLockStatus Indicates the current status of the num. lock key.
capsLockStatus Indicates the current status of the caps lock key.
scrollLockStatus Indicates the current status of the scroll lock key.

Definition at line 197 of file main.c.

Here is the call graph for this function:

int main ( void   ) 

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

Definition at line 251 of file main.c.

Here is the call graph for this function:

void USBDCallbacks_RequestReceived ( const USBGenericRequest request  ) 

Invoked whenever a SETUP request is received from the host. Forwards the request to the standard handler.

Definition at line 175 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 185 of file main.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines