Final version.

Dependencies:   F746_GUI F746_SAI_IO UIT_FFT_Real

Fork of F746_Spectrogram by 不韋 呂

Committer:
MikamiUitOpen
Date:
Sun Oct 02 10:51:10 2016 +0000
Revision:
4:c1beacfc42c7
5

Who changed what in which revision?

UserRevisionLine numberNew contents of line
MikamiUitOpen 4:c1beacfc42c7 1 /* mbed Microcontroller Library
MikamiUitOpen 4:c1beacfc42c7 2 * Copyright (c) 2006-2013 ARM Limited
MikamiUitOpen 4:c1beacfc42c7 3 *
MikamiUitOpen 4:c1beacfc42c7 4 * Licensed under the Apache License, Version 2.0 (the "License");
MikamiUitOpen 4:c1beacfc42c7 5 * you may not use this file except in compliance with the License.
MikamiUitOpen 4:c1beacfc42c7 6 * You may obtain a copy of the License at
MikamiUitOpen 4:c1beacfc42c7 7 *
MikamiUitOpen 4:c1beacfc42c7 8 * http://www.apache.org/licenses/LICENSE-2.0
MikamiUitOpen 4:c1beacfc42c7 9 *
MikamiUitOpen 4:c1beacfc42c7 10 * Unless required by applicable law or agreed to in writing, software
MikamiUitOpen 4:c1beacfc42c7 11 * distributed under the License is distributed on an "AS IS" BASIS,
MikamiUitOpen 4:c1beacfc42c7 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
MikamiUitOpen 4:c1beacfc42c7 13 * See the License for the specific language governing permissions and
MikamiUitOpen 4:c1beacfc42c7 14 * limitations under the License.
MikamiUitOpen 4:c1beacfc42c7 15 */
MikamiUitOpen 4:c1beacfc42c7 16 #ifndef MBED_TIMEREVENT_H
MikamiUitOpen 4:c1beacfc42c7 17 #define MBED_TIMEREVENT_H
MikamiUitOpen 4:c1beacfc42c7 18
MikamiUitOpen 4:c1beacfc42c7 19 #include "ticker_api.h"
MikamiUitOpen 4:c1beacfc42c7 20 #include "us_ticker_api.h"
MikamiUitOpen 4:c1beacfc42c7 21
MikamiUitOpen 4:c1beacfc42c7 22 namespace mbed {
MikamiUitOpen 4:c1beacfc42c7 23
MikamiUitOpen 4:c1beacfc42c7 24 /** Base abstraction for timer interrupts
MikamiUitOpen 4:c1beacfc42c7 25 */
MikamiUitOpen 4:c1beacfc42c7 26 class TimerEvent {
MikamiUitOpen 4:c1beacfc42c7 27 public:
MikamiUitOpen 4:c1beacfc42c7 28 TimerEvent();
MikamiUitOpen 4:c1beacfc42c7 29 TimerEvent(const ticker_data_t *data);
MikamiUitOpen 4:c1beacfc42c7 30
MikamiUitOpen 4:c1beacfc42c7 31 /** The handler registered with the underlying timer interrupt
MikamiUitOpen 4:c1beacfc42c7 32 */
MikamiUitOpen 4:c1beacfc42c7 33 static void irq(uint32_t id);
MikamiUitOpen 4:c1beacfc42c7 34
MikamiUitOpen 4:c1beacfc42c7 35 /** Destruction removes it...
MikamiUitOpen 4:c1beacfc42c7 36 */
MikamiUitOpen 4:c1beacfc42c7 37 virtual ~TimerEvent();
MikamiUitOpen 4:c1beacfc42c7 38
MikamiUitOpen 4:c1beacfc42c7 39 protected:
MikamiUitOpen 4:c1beacfc42c7 40 // The handler called to service the timer event of the derived class
MikamiUitOpen 4:c1beacfc42c7 41 virtual void handler() = 0;
MikamiUitOpen 4:c1beacfc42c7 42
MikamiUitOpen 4:c1beacfc42c7 43 // insert in to linked list
MikamiUitOpen 4:c1beacfc42c7 44 void insert(timestamp_t timestamp);
MikamiUitOpen 4:c1beacfc42c7 45
MikamiUitOpen 4:c1beacfc42c7 46 // remove from linked list, if in it
MikamiUitOpen 4:c1beacfc42c7 47 void remove();
MikamiUitOpen 4:c1beacfc42c7 48
MikamiUitOpen 4:c1beacfc42c7 49 ticker_event_t event;
MikamiUitOpen 4:c1beacfc42c7 50
MikamiUitOpen 4:c1beacfc42c7 51 const ticker_data_t *_ticker_data;
MikamiUitOpen 4:c1beacfc42c7 52 };
MikamiUitOpen 4:c1beacfc42c7 53
MikamiUitOpen 4:c1beacfc42c7 54 } // namespace mbed
MikamiUitOpen 4:c1beacfc42c7 55
MikamiUitOpen 4:c1beacfc42c7 56 #endif