forked from PAWPAW-Mirror/lib_xua
Merge pull request #109 from mbanth/feature/pendragon_merge_cleanup
Feature/pendragon merge cleanup
This commit is contained in:
@@ -10,6 +10,7 @@ lib_xua Change Log
|
|||||||
* ADDED: Pre-processor symbols to enable single-threaded, dual-PDM
|
* ADDED: Pre-processor symbols to enable single-threaded, dual-PDM
|
||||||
microphone operation
|
microphone operation
|
||||||
* FIXED: Descriptors for XUA_ADAPTIVE incorrectly defined for IN endpoint
|
* FIXED: Descriptors for XUA_ADAPTIVE incorrectly defined for IN endpoint
|
||||||
|
* ADDED: Guards to user_hid.h and xua_hid.h
|
||||||
|
|
||||||
0.2.1
|
0.2.1
|
||||||
-----
|
-----
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
// Copyright (c) 2013-2019, XMOS Ltd, All rights reserved
|
// Copyright (c) 2013-2019, XMOS Ltd, All rights reserved
|
||||||
|
|
||||||
|
#ifndef __USER_HID_H__
|
||||||
|
#define __USER_HID_H__
|
||||||
|
|
||||||
/* These defines relate to the HID report desc - do not mod */
|
/* These defines relate to the HID report desc - do not mod */
|
||||||
#define HID_CONTROL_PLAYPAUSE_SHIFT 0x00
|
#define HID_CONTROL_PLAYPAUSE_SHIFT 0x00
|
||||||
#define HID_CONTROL_NEXT_SHIFT 0x01
|
#define HID_CONTROL_NEXT_SHIFT 0x01
|
||||||
@@ -17,3 +20,4 @@ void UserReadHIDData( unsigned char hidData[ HID_DATA_SIZE ]);
|
|||||||
void UserSetHIDData( const unsigned hidData );
|
void UserSetHIDData( const unsigned hidData );
|
||||||
|
|
||||||
#endif /* ( 0 < HID_CONTROLS ) */
|
#endif /* ( 0 < HID_CONTROLS ) */
|
||||||
|
#endif /* __USER_HID_H__ */
|
||||||
|
|||||||
@@ -57,7 +57,10 @@ unsigned HidIsSetIdleSilenced( void )
|
|||||||
|
|
||||||
if( s_hidIdleActive ) {
|
if( s_hidIdleActive ) {
|
||||||
unsigned currentTime;
|
unsigned currentTime;
|
||||||
asm volatile( "gettime %0" : "=r" ( currentTime )); // Use inline assembly to access the time without creating a side-effect
|
// Use inline assembly to access the time without creating a side-effect.
|
||||||
|
// The mapper complains if the time comes from an XC timer because this function is called in the guard of a select case.
|
||||||
|
// Appearently the use of a timer creates a side-effect that prohibits the operation of the select functionality.
|
||||||
|
asm volatile( "gettime %0" : "=r" ( currentTime ));
|
||||||
isSilenced = ( s_hidIndefiniteDuration || ( timeafter( s_hidNextReportTime, currentTime )));
|
isSilenced = ( s_hidIndefiniteDuration || ( timeafter( s_hidNextReportTime, currentTime )));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
// Copyright (c) 2019, XMOS Ltd, All rights reserved
|
// Copyright (c) 2019, XMOS Ltd, All rights reserved
|
||||||
|
|
||||||
|
#ifndef __XUA_HID_H__
|
||||||
|
#define __XUA_HID_H__
|
||||||
|
|
||||||
#include <xs1.h>
|
#include <xs1.h>
|
||||||
#include <xccompat.h>
|
#include <xccompat.h>
|
||||||
#include "xud.h"
|
#include "xud.h"
|
||||||
@@ -53,3 +57,5 @@ XUD_Result_t HidInterfaceClassRequests(
|
|||||||
* \retval 0 -- Send the HID Report
|
* \retval 0 -- Send the HID Report
|
||||||
*/
|
*/
|
||||||
unsigned HidIsSetIdleSilenced( void );
|
unsigned HidIsSetIdleSilenced( void );
|
||||||
|
|
||||||
|
#endif // __XUA_HID_H__
|
||||||
|
|||||||
Reference in New Issue
Block a user