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.
Dependencies: F746_GUI F746_SAI_IO
mbed_src_STM32F7/common/us_ticker_api.c@6:38f7dce055d0, 2016-10-02 (annotated)
- Committer:
- MikamiUitOpen
- Date:
- Sun Oct 02 10:44:58 2016 +0000
- Revision:
- 6:38f7dce055d0
7
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| MikamiUitOpen | 6:38f7dce055d0 | 1 | /* mbed Microcontroller Library |
| MikamiUitOpen | 6:38f7dce055d0 | 2 | * Copyright (c) 2015 ARM Limited |
| MikamiUitOpen | 6:38f7dce055d0 | 3 | * |
| MikamiUitOpen | 6:38f7dce055d0 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| MikamiUitOpen | 6:38f7dce055d0 | 5 | * you may not use this file except in compliance with the License. |
| MikamiUitOpen | 6:38f7dce055d0 | 6 | * You may obtain a copy of the License at |
| MikamiUitOpen | 6:38f7dce055d0 | 7 | * |
| MikamiUitOpen | 6:38f7dce055d0 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| MikamiUitOpen | 6:38f7dce055d0 | 9 | * |
| MikamiUitOpen | 6:38f7dce055d0 | 10 | * Unless required by applicable law or agreed to in writing, software |
| MikamiUitOpen | 6:38f7dce055d0 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| MikamiUitOpen | 6:38f7dce055d0 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| MikamiUitOpen | 6:38f7dce055d0 | 13 | * See the License for the specific language governing permissions and |
| MikamiUitOpen | 6:38f7dce055d0 | 14 | * limitations under the License. |
| MikamiUitOpen | 6:38f7dce055d0 | 15 | */ |
| MikamiUitOpen | 6:38f7dce055d0 | 16 | #include "us_ticker_api.h" |
| MikamiUitOpen | 6:38f7dce055d0 | 17 | |
| MikamiUitOpen | 6:38f7dce055d0 | 18 | static ticker_event_queue_t events; |
| MikamiUitOpen | 6:38f7dce055d0 | 19 | |
| MikamiUitOpen | 6:38f7dce055d0 | 20 | static const ticker_interface_t us_interface = { |
| MikamiUitOpen | 6:38f7dce055d0 | 21 | .init = us_ticker_init, |
| MikamiUitOpen | 6:38f7dce055d0 | 22 | .read = us_ticker_read, |
| MikamiUitOpen | 6:38f7dce055d0 | 23 | .disable_interrupt = us_ticker_disable_interrupt, |
| MikamiUitOpen | 6:38f7dce055d0 | 24 | .clear_interrupt = us_ticker_clear_interrupt, |
| MikamiUitOpen | 6:38f7dce055d0 | 25 | .set_interrupt = us_ticker_set_interrupt, |
| MikamiUitOpen | 6:38f7dce055d0 | 26 | }; |
| MikamiUitOpen | 6:38f7dce055d0 | 27 | |
| MikamiUitOpen | 6:38f7dce055d0 | 28 | static const ticker_data_t us_data = { |
| MikamiUitOpen | 6:38f7dce055d0 | 29 | .interface = &us_interface, |
| MikamiUitOpen | 6:38f7dce055d0 | 30 | .queue = &events, |
| MikamiUitOpen | 6:38f7dce055d0 | 31 | }; |
| MikamiUitOpen | 6:38f7dce055d0 | 32 | |
| MikamiUitOpen | 6:38f7dce055d0 | 33 | const ticker_data_t* get_us_ticker_data(void) |
| MikamiUitOpen | 6:38f7dce055d0 | 34 | { |
| MikamiUitOpen | 6:38f7dce055d0 | 35 | return &us_data; |
| MikamiUitOpen | 6:38f7dce055d0 | 36 | } |
| MikamiUitOpen | 6:38f7dce055d0 | 37 | |
| MikamiUitOpen | 6:38f7dce055d0 | 38 | void us_ticker_irq_handler(void) |
| MikamiUitOpen | 6:38f7dce055d0 | 39 | { |
| MikamiUitOpen | 6:38f7dce055d0 | 40 | ticker_irq_handler(&us_data); |
| MikamiUitOpen | 6:38f7dce055d0 | 41 | } |