Merge pull request #109 from mbanth/feature/pendragon_merge_cleanup

Feature/pendragon merge cleanup
This commit is contained in:
oscarbailey-xmos
2019-12-06 10:09:36 +00:00
committed by GitHub
4 changed files with 15 additions and 1 deletions

View File

@@ -10,6 +10,7 @@ lib_xua Change Log
* ADDED: Pre-processor symbols to enable single-threaded, dual-PDM
microphone operation
* FIXED: Descriptors for XUA_ADAPTIVE incorrectly defined for IN endpoint
* ADDED: Guards to user_hid.h and xua_hid.h
0.2.1
-----

View File

@@ -1,5 +1,8 @@
// 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 */
#define HID_CONTROL_PLAYPAUSE_SHIFT 0x00
#define HID_CONTROL_NEXT_SHIFT 0x01
@@ -17,3 +20,4 @@ void UserReadHIDData( unsigned char hidData[ HID_DATA_SIZE ]);
void UserSetHIDData( const unsigned hidData );
#endif /* ( 0 < HID_CONTROLS ) */
#endif /* __USER_HID_H__ */

View File

@@ -57,7 +57,10 @@ unsigned HidIsSetIdleSilenced( void )
if( s_hidIdleActive ) {
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 )));
}

View File

@@ -1,4 +1,8 @@
// Copyright (c) 2019, XMOS Ltd, All rights reserved
#ifndef __XUA_HID_H__
#define __XUA_HID_H__
#include <xs1.h>
#include <xccompat.h>
#include "xud.h"
@@ -53,3 +57,5 @@ XUD_Result_t HidInterfaceClassRequests(
* \retval 0 -- Send the HID Report
*/
unsigned HidIsSetIdleSilenced( void );
#endif // __XUA_HID_H__