mainusb.c-DIFF
--- mainusb.c-OLD 2020-11-21 12:00:00.000000000 +0100
+++ mainusb.c 2020-12-24 12:00:00.000000000 +0100
@@ -30,7 +30,7 @@
* SiLabs AN249 Human Interface Device Tutorial Rev. 0.5 3/11
* Copyright (C) 2011 by Silicon Laboratories.
*
- * @(#)mainusb.c 1.2 - 2020-11-21 skhs
+ * @(#)mainusb.c 1.3 - 2020-12-24 skhs
*
*/
@@ -81,7 +81,7 @@
#define LED_PWM_ACTIVE_TIME_BY_MILLISECONDS ( 1)
#define LED_PWM_TOTAL_PERIOD_BY_MILLISECONDS ( 20)
#define LED_BLINKING_PERIOD_BY_MILLISECONDS_FAST ( 200)
-#define LED_BLINKING_PERIOD_BY_MILLISECONDS_SLOW (4000)
+#define LED_BLINKING_PERIOD_BY_MILLISECONDS_SLOW (2000)
#define MUCO_COMMUNICATIONS_BUFFER_DIM (448)
#define MUCO_BYTECODE_STORAGE_MULTIPLIER (4)
@@ -1703,12 +1703,14 @@
uint8_t mydataloc *);
extern void ifaceflashmemorypagewrite (const uint8_t mydataloc *,
const uint8_t mycodeloc *);
+extern void ifacegetappidandsernoloc (const uint8_t mycodeloc * mydataloc *,
+ const uint8_t mycodeloc * mydataloc *, uint16_t mydataloc *,
+ uint16_t mydataloc *);
extern uint16_t ifacegetbcddevicereleasenumber (void);
extern const uint8_t mycodeloc * const mycodeloc *
ifacegetconstaddrarrayaddress (uint8_t);
extern const uint16_t mycodeloc * ifacegetconstlengarrayaddress (uint8_t);
extern void ifacegetrandombytesbase (uint8_t mydataloc *);
-extern uint8_t ifacegetusbstringdim (void);
#endif
/****************************************************************************/
@@ -1972,11 +1974,11 @@
(void) ifaceflashmemorypagedim ();
(void) ifaceflashmemorypageread (0, 0);
(void) ifaceflashmemorypagewrite (0, 0);
+ (void) ifacegetappidandsernoloc (0, 0, 0, 0);
(void) ifacegetbcddevicereleasenumber ();
(void) ifacegetconstaddrarrayaddress (0);
(void) ifacegetconstlengarrayaddress (0);
(void) ifacegetrandombytesbase (0);
- (void) ifacegetusbstringdim ();
}
#endif
gothelo = 0;
@@ -2242,6 +2244,22 @@
/****************************************************************************/
#if ((!defined (EXCLUDE_IFACES)) || (!defined (IMPLEMENT_A_CRUNCHER_STUB)))
+void
+ifacegetappidandsernoloc (const uint8_t mycodeloc * mydataloc *ppa,
+ const uint8_t mycodeloc * mydataloc *pps,
+ uint16_t mydataloc *pla, uint16_t mydataloc *pls)
+{
+ *ppa = (const uint8_t mycodeloc *) &hiddenapplicationid;
+ *pps = (const uint8_t mycodeloc *) &usbstringserialnumber;
+ *pla = (uint16_t) (sizeof (hiddenapplicationid ) / sizeof (uint8_t));
+ *pls = (uint16_t) (sizeof (usbstringserialnumber) / sizeof (uint8_t));
+ return;
+ }
+#endif
+
+/****************************************************************************/
+
+#if ((!defined (EXCLUDE_IFACES)) || (!defined (IMPLEMENT_A_CRUNCHER_STUB)))
uint16_t
ifacegetbcddevicereleasenumber (void)
{
@@ -2354,16 +2372,6 @@
}
#endif
-/****************************************************************************/
-
-#if ((!defined (EXCLUDE_IFACES)) || (!defined (IMPLEMENT_A_CRUNCHER_STUB)))
-uint8_t
-ifacegetusbstringdim (void)
-{
- return ((uint8_t) sizeof (usbpaddedstringdescriptor_t));
- }
-#endif
-
/****************************************************************************/
static void
Stephan K.H. Seidl