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: sMotor LIS3MDL X_NUCLEO_53L0A1
lis3mdl_class.cpp@0:ed3e71232bc7, 2019-05-23 (annotated)
- Committer:
- simens
- Date:
- Thu May 23 05:55:34 2019 +0000
- Revision:
- 0:ed3e71232bc7
123
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| simens | 0:ed3e71232bc7 | 1 | #include <lis3mdl_class.h> |
| simens | 0:ed3e71232bc7 | 2 | |
| simens | 0:ed3e71232bc7 | 3 | MAGNETO_StatusTypeDef LIS3MDL::LIS3MDL_M_SetAxeOffset(uint8_t axe,int16_t offset) |
| simens | 0:ed3e71232bc7 | 4 | { |
| simens | 0:ed3e71232bc7 | 5 | uint8_t tmp[2]; |
| simens | 0:ed3e71232bc7 | 6 | tmp[0]=offset; |
| simens | 0:ed3e71232bc7 | 7 | tmp[1]=offset>>8; |
| simens | 0:ed3e71232bc7 | 8 | if(LIS3MDL_IO_Write(tmp, 5+2*axe, 2)!= MAGNETO_OK) |
| simens | 0:ed3e71232bc7 | 9 | return MAGNETO_ERROR; |
| simens | 0:ed3e71232bc7 | 10 | else |
| simens | 0:ed3e71232bc7 | 11 | return MAGNETO_OK; |
| simens | 0:ed3e71232bc7 | 12 | } |