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.
Go to the source code of this file.
Functions | |
| static void | updateUartBaudrate () |
| Try to find the correct uart baudrate. | |
| static Serial | pc (PC_TX, PC_RX) |
| Serial object for communicating with the PC. | |
| static DigitalInOut | resetLine (MT_RESET, PIN_INPUT, OpenDrain, 1) |
| Reset line towards the module. Pulling this line down keeps the module in reset. | |
| static void | createMtInterface () |
| Create an instance of MtInterface. | |
| static int | readXffData (uint8_t *buffer, int offset, int length) |
| Callback function for FwUpdate for reading data from the xff (xsens firmware file) file. | |
| static void | readyHandler (FWU_Result result) |
| Callback function for FwUpdate for signaling that a firmware update has completed. | |
| static void | gotoConfig () |
| Sends a XMID_GotoConfig message to the Module. | |
| static void | handleXbusMessage (XbusMessage *xbusMessage) |
| Handles xbus messages from the module. | |
| static void | hardwareReset (bool stayInBootloader) |
| Reset the module via the hardware reset line. | |
| static void | sendXbusMessageWrapper (XbusMessage const *xbusMessage) |
| C-wrapper for sendXbusMessage callback function of FwUpdate. | |
| static char * | lowLevelFormatToString (XbusBusFormat format) |
| Helper function for converting a XbusLowLevelFormat to string. | |
| static void | printUsageInfo () |
| Print usage info of this example. | |
| int | main () |
| Main entry point of the embedded firmware updater example. | |
Variables | |
| static MtInterface * | mtInterface = 0 |
| Instance of MtInterface. Should be initialized by createMtInterface(). | |
| static FwUpdate * | g_fwUpdate = NULL |
| Instance of the firmware updater. | |
Detailed Description
Copyright (C) Xsens Technologies B.V., 2015.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file main.cpp.
Function Documentation
| static void createMtInterface | ( | ) | [static] |
Create an instance of MtInterface.
| static void gotoConfig | ( | ) | [static] |
| static void handleXbusMessage | ( | XbusMessage * | xbusMessage ) | [static] |
| static void hardwareReset | ( | bool | stayInBootloader ) | [static] |
Reset the module via the hardware reset line.
- Parameters:
-
stayInBootloader,: If stayInBootloader is true, an XMID_GotoBootLoader is sent immediately after the reset.
By sending an XMID_GotoBootLoader within 100 ms after reset the module stays in bootloader mode instead of booting the application. This can be used if the normal GotoBootloader command fails to put the module in bootloader mode, e.g. because of a faulty firmware.
| static char* lowLevelFormatToString | ( | XbusBusFormat | format ) | [static] |
| int main | ( | ) |
| static Serial pc | ( | PC_TX | , |
| PC_RX | |||
| ) | [static] |
Serial object for communicating with the PC.
| static void printUsageInfo | ( | ) | [static] |
| static int readXffData | ( | uint8_t * | buffer, |
| int | offset, | ||
| int | length | ||
| ) | [static] |
Callback function for FwUpdate for reading data from the xff (xsens firmware file) file.
- Parameters:
-
buffer Target buffer in which the xff data should be written offset Offset in the xff file where reading should start length Number of bytes which is requested
- Returns:
- Number of bytes which is actually written to the buffer
| static void readyHandler | ( | FWU_Result | result ) | [static] |
| static DigitalInOut resetLine | ( | MT_RESET | , |
| PIN_INPUT | , | ||
| OpenDrain | , | ||
| 1 | |||
| ) | [static] |
Reset line towards the module. Pulling this line down keeps the module in reset.
| static void sendXbusMessageWrapper | ( | XbusMessage const * | xbusMessage ) | [static] |
| static void updateUartBaudrate | ( | ) | [static] |
Variable Documentation
FwUpdate* g_fwUpdate = NULL [static] |
MtInterface* mtInterface = 0 [static] |
Instance of MtInterface. Should be initialized by createMtInterface().
Generated on Wed Jul 13 2022 07:56:15 by
1.7.2