From ea807de65b0485ac58b6eae576209c64d4d5c4e9 Mon Sep 17 00:00:00 2001 From: Oxore Date: Sun, 5 Mar 2023 20:20:45 +0300 Subject: Split app code and third party libraries --- third_party/TouchSense/stmCriticalSection.h | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 third_party/TouchSense/stmCriticalSection.h (limited to 'third_party/TouchSense/stmCriticalSection.h') diff --git a/third_party/TouchSense/stmCriticalSection.h b/third_party/TouchSense/stmCriticalSection.h new file mode 100644 index 0000000..dc864f7 --- /dev/null +++ b/third_party/TouchSense/stmCriticalSection.h @@ -0,0 +1,32 @@ +/******************** (C) COPYRIGHT 2014 STMicroelectronics ******************** +* File Name : stmCriticalSection.h +* Author : MCD Tools Development +* Version : V1.0 +* Date : 21/02/2013 +* Description : This file provides a mechanism for STMStudio host/target +* synchronization. Based on a critical section, using few +* target resources (in term of code and RAM), but +* potentially impacting the application runtime (possible +* waiting loop when enterring the critical section). +******************************************************************************** +* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS +* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. +* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, +* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE +* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING +* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. +*******************************************************************************/ + +#ifndef STM_CRITICAL_SECTION_H +#define STM_CRITICAL_SECTION_H + +/* To call before modifying any critical data. In case the host is inside or +asked for enterring the critical section, this routine will wait for the host to +leave the critical section. */ +void enterLock(void); + +/* Leave the critical section. If the host is waiting, access will be granted +to him. Otherwise the first next one asking will own the turn. */ +void exitLock(void); + +#endif /* STM_CRITICAL_SECTION_H */ -- cgit v1.2.3