API for temperature sensor in nrf51822
Dependents: BLE_TemperatureAdvertising BLE_TemperatureObserver TEMP_YM2
TMP_nrf51.h@2:189632d43a8f, 2015-07-20 (annotated)
- Committer:
- sunsmile2015
- Date:
- Mon Jul 20 07:56:01 2015 +0000
- Revision:
- 2:189632d43a8f
- Parent:
- 1:27efbf620fc5
add space
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sunsmile2015 | 0:4a8259030297 | 1 | |
sunsmile2015 | 0:4a8259030297 | 2 | /* mbed Microcontroller Library |
sunsmile2015 | 0:4a8259030297 | 3 | * Copyright (c) 2006-2015 ARM Limited |
sunsmile2015 | 0:4a8259030297 | 4 | * |
sunsmile2015 | 0:4a8259030297 | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
sunsmile2015 | 0:4a8259030297 | 6 | * you may not use this file except in compliance with the License. |
sunsmile2015 | 0:4a8259030297 | 7 | * You may obtain a copy of the License at |
sunsmile2015 | 0:4a8259030297 | 8 | * |
sunsmile2015 | 0:4a8259030297 | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
sunsmile2015 | 0:4a8259030297 | 10 | * |
sunsmile2015 | 0:4a8259030297 | 11 | * Unless required by applicable law or agreed to in writing, software |
sunsmile2015 | 0:4a8259030297 | 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
sunsmile2015 | 0:4a8259030297 | 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
sunsmile2015 | 0:4a8259030297 | 14 | * See the License for the specific language governing permissions and |
sunsmile2015 | 0:4a8259030297 | 15 | * limitations under the License. |
sunsmile2015 | 0:4a8259030297 | 16 | */ |
sunsmile2015 | 0:4a8259030297 | 17 | |
sunsmile2015 | 0:4a8259030297 | 18 | #ifndef TMP_NRF51_H |
sunsmile2015 | 0:4a8259030297 | 19 | #define TMP_NRF51_H |
sunsmile2015 | 0:4a8259030297 | 20 | |
sunsmile2015 | 0:4a8259030297 | 21 | #include "mbed.h" |
sunsmile2015 | 0:4a8259030297 | 22 | |
sunsmile2015 | 0:4a8259030297 | 23 | //!Library for the nrf51822 internal temperature sensor. |
sunsmile2015 | 0:4a8259030297 | 24 | |
sunsmile2015 | 0:4a8259030297 | 25 | class TMP_nrf51 |
sunsmile2015 | 0:4a8259030297 | 26 | { |
sunsmile2015 | 0:4a8259030297 | 27 | public: |
sunsmile2015 | 0:4a8259030297 | 28 | //!use default constructor and destructor. |
sunsmile2015 | 0:4a8259030297 | 29 | |
sunsmile2015 | 1:27efbf620fc5 | 30 | /**@brief Sensor value type. */ |
sunsmile2015 | 1:27efbf620fc5 | 31 | typedef float tmpSensorValue_t; |
sunsmile2015 | 1:27efbf620fc5 | 32 | |
sunsmile2015 | 0:4a8259030297 | 33 | /** |
sunsmile2015 | 0:4a8259030297 | 34 | * @brief Get the temperature value. |
sunsmile2015 | 0:4a8259030297 | 35 | * |
sunsmile2015 | 1:27efbf620fc5 | 36 | * @return Die temperature in °C. |
sunsmile2015 | 0:4a8259030297 | 37 | * |
sunsmile2015 | 0:4a8259030297 | 38 | */ |
sunsmile2015 | 1:27efbf620fc5 | 39 | tmpSensorValue_t get(); |
sunsmile2015 | 0:4a8259030297 | 40 | |
sunsmile2015 | 0:4a8259030297 | 41 | }; |
sunsmile2015 | 0:4a8259030297 | 42 | |
sunsmile2015 | 0:4a8259030297 | 43 | #endif |