My Project
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
VirtualSerial.c File Reference
#include "VirtualSerial.h"
#include <stdlib.h>
Include dependency graph for VirtualSerial.c:

Classes

struct  couleur
 

Macros

#define LED_BIT   0
 
#define BUT_BIT   0
 
#define MAX_BUFFER   64
 
#define NB_COLORS   4
 
#define MAX_COLOR_INTENSITY   4095
 
#define MAX_COLORS   5
 

Functions

char * random_series (int n, couleur *bank)
 
int equals (couleur c1, couleur c2)
 
int contains (couleur c1, couleur *series, size_t length)
 
int main (void)
 
void SetupHardware (void)
 
void EVENT_USB_Device_Connect (void)
 
void EVENT_USB_Device_Disconnect (void)
 
void EVENT_USB_Device_ConfigurationChanged (void)
 
void EVENT_USB_Device_ControlRequest (void)
 
void CDC_Task (void)
 

Variables

const char * CORRECT = "good"
 
const char * MISS = "miss"
 
const char * WRONG = "wrong"
 
int cpt = 0
 
char history [6] = ""
 
char * serie
 

Detailed Description

Main source file for the VirtualSerial demo. This file contains the main tasks of the demo and is responsible for the initial application hardware configuration.

Function Documentation

◆ CDC_Task()

void CDC_Task ( void  )

Function to manage CDC data transmission and reception to and from the host.

◆ EVENT_USB_Device_ConfigurationChanged()

void EVENT_USB_Device_ConfigurationChanged ( void  )

Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration of the USB device after enumeration - the device endpoints are configured and the CDC management task started.

◆ EVENT_USB_Device_Connect()

void EVENT_USB_Device_Connect ( void  )

Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and starts the library USB task to begin the enumeration and USB management process.

◆ EVENT_USB_Device_ControlRequest()

void EVENT_USB_Device_ControlRequest ( void  )

Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to the device from the USB host before passing along unhandled control requests to the library for processing internally.

◆ EVENT_USB_Device_Disconnect()

void EVENT_USB_Device_Disconnect ( void  )

Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via the status LEDs and stops the USB management and CDC management tasks.

◆ main()

int main ( void  )

Main program entry point. This routine contains the overall program flow, including initial setup of all components and the main program loop.

◆ SetupHardware()

void SetupHardware ( void  )

Configures the board hardware and chip peripherals for the demo's functionality.