Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: MotionEventConverter.h
- Revision:
- 0:c41d29f1e0fb
- Child:
- 1:5bfc165e8f08
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/MotionEventConverter.h Tue Jun 28 13:06:53 2016 +0000
@@ -0,0 +1,53 @@
+/* mbed Microcontroller Library
+ * Copyright (C) 2016 Renesas Electronics Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**************************************************************************//**
+* @file MotionEventConverter.h
+* @brief MotionEventConverter API
+******************************************************************************/
+
+#ifndef MOTION_EVENT_CONVERTER_H
+#define MOTION_EVENT_CONVERTER_H
+
+#include "mbed.h"
+#include "rtos.h"
+#include "MotionEvent.h"
+#include "TouchKey.h"
+
+/**
+ * A class to communicate a MotionEventConverter
+ */
+class MotionEventConverter {
+
+public:
+ /** Run the touch panel process.
+ *
+ *
+ * @param cb_func Callback function.
+ */
+ void Process(TouchKey * p_touch, int (*cb_func)(MotionEvent event));
+
+private:
+ MotionEventCtl event;
+ Timer t;
+ TouchKey::touch_pos_t touch_pos[MotionEvent::TOUCH_NUM_MAX];
+ TouchKey::touch_pos_t touch_pos_last[MotionEvent::TOUCH_NUM_MAX];
+ uint32_t time_cnt;
+ int pidx;
+ uint8_t touch_num;
+ uint8_t touch_num_last;
+};
+
+#endif