Example for updating the MTi-1's firmware. Uses a platform independent, retargetable pure C implementation of the firmware updater protocol.
mtinterface_uart.h
00001 /*! 00002 * \file 00003 * \copyright Copyright (C) Xsens Technologies B.V., 2015. 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 00006 * use this file except in compliance with the License. You may obtain a copy 00007 * of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 00013 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 00014 * License for the specific language governing permissions and limitations 00015 * under the License. 00016 */ 00017 #ifndef MTINTERFACE_UART_H 00018 #define MTINTERFACE_UART_H 00019 #include "mbed.h" 00020 #include "mtinterface.h " 00021 00022 00023 class MtInterfaceUart : public MtInterface 00024 { 00025 public: 00026 MtInterfaceUart(int baudrate); 00027 virtual ~MtInterfaceUart(); 00028 00029 virtual void process() {} 00030 virtual void sendXbusMessage(XbusMessage const* xbusMessage); 00031 virtual XbusBusFormat busFormat(); 00032 00033 void setBaudrate(int baudrate); 00034 00035 private: 00036 static void uart_rx_interrupt_handler(); 00037 00038 Serial* m_serial; 00039 uint8_t* m_txBuffer; 00040 }; 00041 00042 00043 00044 #endif // MTINTERFACE_UART_H
Generated on Wed Jul 13 2022 07:56:15 by 1.7.2