The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_ARM_MPS2_M4/TOOLCHAIN_ARM_STD/fpga.h@171:3a7713b1edbc, 2018-11-08 (annotated)
- Committer:
- AnnaBridge
- Date:
- Thu Nov 08 11:45:42 2018 +0000
- Revision:
- 171:3a7713b1edbc
- Parent:
- TARGET_ARM_MPS2_M4/TARGET_ARM_SSG/TARGET_MPS2/SDK/fpga.h@102:da0ca467f8b5
mbed library. Release version 164
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 102:da0ca467f8b5 | 1 | /* mbed Microcontroller Library |
Kojto | 102:da0ca467f8b5 | 2 | * Copyright (c) 2006-2015 ARM Limited |
Kojto | 102:da0ca467f8b5 | 3 | * |
Kojto | 102:da0ca467f8b5 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
Kojto | 102:da0ca467f8b5 | 5 | * you may not use this file except in compliance with the License. |
Kojto | 102:da0ca467f8b5 | 6 | * You may obtain a copy of the License at |
Kojto | 102:da0ca467f8b5 | 7 | * |
Kojto | 102:da0ca467f8b5 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
Kojto | 102:da0ca467f8b5 | 9 | * |
Kojto | 102:da0ca467f8b5 | 10 | * Unless required by applicable law or agreed to in writing, software |
Kojto | 102:da0ca467f8b5 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
Kojto | 102:da0ca467f8b5 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Kojto | 102:da0ca467f8b5 | 13 | * See the License for the specific language governing permissions and |
Kojto | 102:da0ca467f8b5 | 14 | * limitations under the License. |
Kojto | 102:da0ca467f8b5 | 15 | */ |
Kojto | 102:da0ca467f8b5 | 16 | |
Kojto | 102:da0ca467f8b5 | 17 | /* |
Kojto | 102:da0ca467f8b5 | 18 | * Code implementation file for the fpga functions. |
Kojto | 102:da0ca467f8b5 | 19 | */ |
Kojto | 102:da0ca467f8b5 | 20 | |
Kojto | 102:da0ca467f8b5 | 21 | #include "SMM_MPS2.h" // MPS2 common header |
Kojto | 102:da0ca467f8b5 | 22 | |
Kojto | 102:da0ca467f8b5 | 23 | // Function to delay n*ticks (25MHz = 40nS per tick) |
Kojto | 102:da0ca467f8b5 | 24 | // Used for I2C drivers |
Kojto | 102:da0ca467f8b5 | 25 | void i2c_delay(unsigned int tick); |
Kojto | 102:da0ca467f8b5 | 26 | |
Kojto | 102:da0ca467f8b5 | 27 | /* Sleep function to delay n*mS |
Kojto | 102:da0ca467f8b5 | 28 | * Uses FPGA counter. |
Kojto | 102:da0ca467f8b5 | 29 | */ |
Kojto | 102:da0ca467f8b5 | 30 | void Sleepms(unsigned int msec); |
Kojto | 102:da0ca467f8b5 | 31 | |
Kojto | 102:da0ca467f8b5 | 32 | /* Sleep function to delay n*uS |
Kojto | 102:da0ca467f8b5 | 33 | */ |
Kojto | 102:da0ca467f8b5 | 34 | void Sleepus(unsigned int usec); |