//
COMPASS_DISCO_L476VG.cpp@0:ab29fdb4d3aa, 2018-04-12 (annotated)
- Committer:
- Cemohney
- Date:
- Thu Apr 12 22:39:20 2018 +0000
- Revision:
- 0:ab29fdb4d3aa
//
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Cemohney | 0:ab29fdb4d3aa | 1 | /* Copyright (c) 2010-2011 mbed.org, MIT License |
Cemohney | 0:ab29fdb4d3aa | 2 | * |
Cemohney | 0:ab29fdb4d3aa | 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software |
Cemohney | 0:ab29fdb4d3aa | 4 | * and associated documentation files (the "Software"), to deal in the Software without |
Cemohney | 0:ab29fdb4d3aa | 5 | * restriction, including without limitation the rights to use, copy, modify, merge, publish, |
Cemohney | 0:ab29fdb4d3aa | 6 | * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the |
Cemohney | 0:ab29fdb4d3aa | 7 | * Software is furnished to do so, subject to the following conditions: |
Cemohney | 0:ab29fdb4d3aa | 8 | * |
Cemohney | 0:ab29fdb4d3aa | 9 | * The above copyright notice and this permission notice shall be included in all copies or |
Cemohney | 0:ab29fdb4d3aa | 10 | * substantial portions of the Software. |
Cemohney | 0:ab29fdb4d3aa | 11 | * |
Cemohney | 0:ab29fdb4d3aa | 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING |
Cemohney | 0:ab29fdb4d3aa | 13 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
Cemohney | 0:ab29fdb4d3aa | 14 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
Cemohney | 0:ab29fdb4d3aa | 15 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
Cemohney | 0:ab29fdb4d3aa | 16 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Cemohney | 0:ab29fdb4d3aa | 17 | */ |
Cemohney | 0:ab29fdb4d3aa | 18 | |
Cemohney | 0:ab29fdb4d3aa | 19 | #include "COMPASS_DISCO_L476VG.h" |
Cemohney | 0:ab29fdb4d3aa | 20 | |
Cemohney | 0:ab29fdb4d3aa | 21 | // Constructor |
Cemohney | 0:ab29fdb4d3aa | 22 | COMPASS_DISCO_L476VG::COMPASS_DISCO_L476VG() |
Cemohney | 0:ab29fdb4d3aa | 23 | { |
Cemohney | 0:ab29fdb4d3aa | 24 | BSP_COMPASS_Init(); |
Cemohney | 0:ab29fdb4d3aa | 25 | } |
Cemohney | 0:ab29fdb4d3aa | 26 | |
Cemohney | 0:ab29fdb4d3aa | 27 | // Destructor |
Cemohney | 0:ab29fdb4d3aa | 28 | COMPASS_DISCO_L476VG::~COMPASS_DISCO_L476VG() |
Cemohney | 0:ab29fdb4d3aa | 29 | { |
Cemohney | 0:ab29fdb4d3aa | 30 | BSP_COMPASS_DeInit(); |
Cemohney | 0:ab29fdb4d3aa | 31 | } |
Cemohney | 0:ab29fdb4d3aa | 32 | |
Cemohney | 0:ab29fdb4d3aa | 33 | //================================================================================================================= |
Cemohney | 0:ab29fdb4d3aa | 34 | // Public methods |
Cemohney | 0:ab29fdb4d3aa | 35 | //================================================================================================================= |
Cemohney | 0:ab29fdb4d3aa | 36 | |
Cemohney | 0:ab29fdb4d3aa | 37 | COMPASS_StatusTypeDef COMPASS_DISCO_L476VG::Init(void) |
Cemohney | 0:ab29fdb4d3aa | 38 | { |
Cemohney | 0:ab29fdb4d3aa | 39 | return BSP_COMPASS_Init(); |
Cemohney | 0:ab29fdb4d3aa | 40 | } |
Cemohney | 0:ab29fdb4d3aa | 41 | |
Cemohney | 0:ab29fdb4d3aa | 42 | void COMPASS_DISCO_L476VG::DeInit(void) |
Cemohney | 0:ab29fdb4d3aa | 43 | { |
Cemohney | 0:ab29fdb4d3aa | 44 | BSP_COMPASS_DeInit(); |
Cemohney | 0:ab29fdb4d3aa | 45 | } |
Cemohney | 0:ab29fdb4d3aa | 46 | |
Cemohney | 0:ab29fdb4d3aa | 47 | void COMPASS_DISCO_L476VG::LowPower(void) |
Cemohney | 0:ab29fdb4d3aa | 48 | { |
Cemohney | 0:ab29fdb4d3aa | 49 | BSP_COMPASS_LowPower(); |
Cemohney | 0:ab29fdb4d3aa | 50 | } |
Cemohney | 0:ab29fdb4d3aa | 51 | |
Cemohney | 0:ab29fdb4d3aa | 52 | void COMPASS_DISCO_L476VG::AccGetXYZ(int16_t *pDataXYZ) |
Cemohney | 0:ab29fdb4d3aa | 53 | { |
Cemohney | 0:ab29fdb4d3aa | 54 | BSP_COMPASS_AccGetXYZ(pDataXYZ); |
Cemohney | 0:ab29fdb4d3aa | 55 | } |
Cemohney | 0:ab29fdb4d3aa | 56 | |
Cemohney | 0:ab29fdb4d3aa | 57 | void COMPASS_DISCO_L476VG::MagGetXYZ(int16_t *pDataXYZ) |
Cemohney | 0:ab29fdb4d3aa | 58 | { |
Cemohney | 0:ab29fdb4d3aa | 59 | BSP_COMPASS_MagGetXYZ(pDataXYZ); |
Cemohney | 0:ab29fdb4d3aa | 60 | } |
Cemohney | 0:ab29fdb4d3aa | 61 | |
Cemohney | 0:ab29fdb4d3aa | 62 | //================================================================================================================= |
Cemohney | 0:ab29fdb4d3aa | 63 | // Private methods |
Cemohney | 0:ab29fdb4d3aa | 64 | //================================================================================================================= |
Cemohney | 0:ab29fdb4d3aa | 65 |