Skip to content

Commit c11c2db

Browse files
committed
Updated comments in source files
1 parent b50e517 commit c11c2db

File tree

9 files changed

+98
-66
lines changed

9 files changed

+98
-66
lines changed

inc/astrokey.h

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
/*
2-
* astrokey.h
3-
*
4-
* Created on: Nov 3, 2017
5-
* Author: Aaron
6-
*/
1+
//-----------------------------------------------------------------------------
2+
// astrokey.h
3+
//-----------------------------------------------------------------------------
4+
// Copyright 2018 AstroKey
5+
// https://github.com/AstroKey/astrokey_firmware/blob/master/LICENSE
6+
//
7+
// File Description:
8+
//
9+
// AstroKey-specific definitions and function declarations.
10+
//
711

812
#ifndef INC_ASTROKEY_H_
913
#define INC_ASTROKEY_H_

inc/delay.h

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
/*
2-
* delay.h
3-
*
4-
* Created on: Dec 2, 2017
5-
* Author: Aaron
6-
*/
1+
//-----------------------------------------------------------------------------
2+
// delay.c
3+
//-----------------------------------------------------------------------------
4+
// Copyright 2018 AstroKey
5+
// https://github.com/AstroKey/astrokey_firmware/blob/master/LICENSE
6+
//
7+
// File Description:
8+
//
9+
// Declarations for the millisecond counter.
10+
//
711

812
#ifndef INC_DELAY_H_
913
#define INC_DELAY_H_

inc/descriptors.h

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
1-
/**************************************************************************//**
2-
* Copyright (c) 2015 by Silicon Laboratories Inc. All rights reserved.
3-
*
4-
* http://developer.silabs.com/legal/version/v11/Silicon_Labs_Software_License_Agreement.txt
5-
*****************************************************************************/
1+
//-----------------------------------------------------------------------------
2+
// descriptors.c
3+
//-----------------------------------------------------------------------------
4+
// Copyright 2018 AstroKey
5+
// https://github.com/AstroKey/astrokey_firmware/blob/master/LICENSE
6+
//
7+
// Portions of this code attributed to the following license:
8+
//
9+
// /**************************************************************************//**
10+
// * Copyright (c) 2015 by Silicon Laboratories Inc. All rights reserved.
11+
// *
12+
// * http://developer.silabs.com/legal/version/v11/Silicon_Labs_Software_License_Agreement.txt
13+
// *****************************************************************************/
14+
//
15+
// File Description:
16+
//
17+
// Declarations of AstroKey USB parameters and descriptors.
618

719
#ifndef __SILICON_LABS_DESCRIPTORS_H__
820
#define __SILICON_LABS_DESCRIPTORS_H__
@@ -19,17 +31,6 @@ extern "C"
1931
{
2032
#endif
2133

22-
// -------------------- USB Identification ------------------------------------
23-
//
24-
// **********
25-
// NOTE: YOU MUST PROVIDE YOUR OWN USB VID/PID (below)
26-
// **********
27-
//
28-
// Following are the definition of the USB VID and PID. These are example
29-
// values and are assigned to Silicon Labs. You may not use the Silicon
30-
// Labs VID/PID values in your product. You must provide your own assigned
31-
// VID and PID values.
32-
///
3334
// $[Vendor ID]
3435
#define USB_VENDOR_ID htole16(0x10c4)
3536
// [Vendor ID]$

inc/webusb.h

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
/*
2-
* webusb.h
3-
*
4-
* Created on: Oct 20, 2017
5-
* Author: Aaron
6-
*/
1+
//-----------------------------------------------------------------------------
2+
// descriptors.c
3+
//-----------------------------------------------------------------------------
4+
// Copyright 2018 AstroKey
5+
// https://github.com/AstroKey/astrokey_firmware/blob/master/LICENSE
6+
//
7+
// File Description:
8+
//
9+
// Declarations of WebUSB constant and descriptors
10+
//
711

812
#ifndef INC_WEBUSB_H_
913
#define INC_WEBUSB_H_

src/astrokey.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
/*
2-
* astrokey.c
3-
*
4-
* Created on: Feb 4, 2018
5-
* Author: Aaron
6-
*/
1+
//-----------------------------------------------------------------------------
2+
// astrokey.c
3+
//-----------------------------------------------------------------------------
4+
// Copyright 2018 AstroKey
5+
// https://github.com/AstroKey/astrokey_firmware/blob/master/LICENSE
6+
//
7+
// File Description:
8+
//
9+
// Implementation of AstroKey input polling and other device-specific functionality.
10+
//
711

812
#include "astrokey.h"
913
#include "InitDevice.h"

src/callback.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
/**************************************************************************//**
2-
* Copyright (c) 2015 by Silicon Laboratories Inc. All rights reserved.
3-
*
4-
* http://developer.silabs.com/legal/version/v11/Silicon_Labs_Software_License_Agreement.txt
5-
*****************************************************************************/
1+
//-----------------------------------------------------------------------------
2+
// callback.c
3+
//-----------------------------------------------------------------------------
4+
// Copyright 2018 AstroKey
5+
// https://github.com/AstroKey/astrokey_firmware/blob/master/LICENSE
6+
//
7+
// File Description:
8+
//
9+
// Implementations of USB callback functions.
10+
//
611

712
#include "SI_EFM8UB1_Register_Enums.h"
813
#include "efm8_usb.h"

src/delay.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
//-----------------------------------------------------------------------------
2+
// delay.c
3+
//-----------------------------------------------------------------------------
4+
// Copyright 2018 AstroKey
5+
// https://github.com/AstroKey/astrokey_firmware/blob/master/LICENSE
6+
//
7+
// File Description:
8+
//
9+
// Implementation of the millisecond counter.
10+
//
11+
112
#include "SI_EFM8UB1_Register_Enums.h"
213
#include "delay.h"
314

src/descriptors.c

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
1-
/*******************************************************************************
2-
* @file descriptors.c
3-
* @brief USB descriptors.
4-
* @author PLACEHOLDER
5-
* @version PLACEHOLDER
6-
*******************************************************************************/
7-
//LICENSE PLACEHOLDER
8-
9-
10-
//=============================================================================
11-
// src/descriptors.c: generated by Hardware Configurator
12-
//
13-
// This file is only generated if it does not exist. Modifications in this file
14-
// will persist even if Configurator generates code. To refresh this file,
15-
// you must first delete it and then regenerate code.
16-
//=============================================================================
17-
181
//-----------------------------------------------------------------------------
19-
// Includes
2+
// descriptors.c
203
//-----------------------------------------------------------------------------
4+
// Copyright 2018 AstroKey
5+
// https://github.com/AstroKey/astrokey_firmware/blob/master/LICENSE
6+
//
7+
// File Description:
8+
//
9+
// Implementations of AstroKey USB descriptors.
10+
//
2111
#include <si_toolchain.h>
2212
#include <endian.h>
2313
#include <stdlib.h>
@@ -76,6 +66,7 @@ SI_SEGMENT_VARIABLE(ReportDescriptor0[69],
7666

7767
};
7868

69+
// USB Device Descriptor
7970
SI_SEGMENT_VARIABLE(deviceDesc[],
8071
const USB_DeviceDescriptor_TypeDef,
8172
SI_SEG_CODE) =
@@ -96,6 +87,7 @@ SI_SEGMENT_VARIABLE(deviceDesc[],
9687
1, // bNumConfigurations
9788
};
9889

90+
// USB Configuration Descriptor for Configuration 1
9991
SI_SEGMENT_VARIABLE(configDesc[],
10092
const uint8_t,
10193
SI_SEG_CODE) =
@@ -155,6 +147,7 @@ SI_SEGMENT_VARIABLE(configDesc[],
155147
1, // bInterval
156148
};
157149

150+
// USB Binary Object Store Descriptor
158151
SI_SEGMENT_VARIABLE(bosDesc,
159152
const USB_BOS_TypeDef,
160153
SI_SEG_CODE) =
@@ -198,6 +191,7 @@ SI_SEGMENT_VARIABLE(bosDesc,
198191
}
199192
};
200193

194+
// Microsoft OS 2.0 Descriptor Set
201195
SI_SEGMENT_VARIABLE(msDesc, const MS_OS_20_DescriptorSet_TypeDef, SI_SEG_CODE) =
202196
{
203197
{
@@ -257,15 +251,15 @@ UTF16LE_PACKED_STATIC_CONST_STRING_DESC( mfrDesc[], MFR_STRING, MFR_SIZE );
257251
UTF16LE_PACKED_STATIC_CONST_STRING_DESC( prodDesc[], PROD_STRING, PROD_SIZE );
258252
UTF16LE_PACKED_STATIC_CONST_STRING_DESC( serDesc[], SER_STRING, SER_SIZE );
259253

260-
//-----------------------------------------------------------------------------
254+
// USB String Table
261255
SI_SEGMENT_VARIABLE_SEGMENT_POINTER(myUsbStringTable_USEnglish[], static const USB_StringDescriptor_TypeDef, SI_SEG_GENERIC, const SI_SEG_CODE) =
262256
{
263257
(SI_VARIABLE_SEGMENT_POINTER(, uint8_t, SI_SEG_CODE))langDesc,
264258
mfrDesc,
265259
prodDesc,
266260
serDesc,
267261
};
268-
//-----------------------------------------------------------------------------
262+
// USB Initalization Struct
269263
SI_SEGMENT_VARIABLE(initstruct,
270264
const USBD_Init_TypeDef,
271265
SI_SEG_CODE) =
@@ -279,8 +273,10 @@ SI_SEGMENT_VARIABLE(initstruct,
279273
#define URL0_STRING 'a','s','t','r','o','k','e','y','.','g','i','t','h','u','b','.','i','o'
280274
#define URL0_SIZE 18
281275

276+
// WebUSB Landing Page URL Descriptor
282277
URL_DESC( landingPage[] , URL0_SIZE, WEBUSB_SCHEME_HTTPS, URL0_STRING);
283278

279+
// WebUSB URL Descriptor Table
284280
SI_SEGMENT_VARIABLE_SEGMENT_POINTER(myURLs[], const USB_URLDescriptor_TypeDef, SI_SEG_GENERIC, const SI_SEG_CODE) =
285281
{
286282
landingPage,

src/main.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
// The WebUSB Interface allows the AstroKey website to save workflows created by the user to the device.
1313
// The HID Interface plays back macros.
1414
//
15-
#include "SI_EFM8UB1_Register_Enums.h"
15+
// File Description:
16+
//
17+
// The main source code file for the AstroKey firmware.
18+
//
1619
#include "astrokey.h"
1720

1821
#include <stdint.h>

0 commit comments

Comments
 (0)