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.
info.h
00001 /** 00002 * @file info.h 00003 * @brief methods to get information about the board 00004 * 00005 * DAPLink Interface Firmware 00006 * Copyright (c) 2009-2016, ARM Limited, All Rights Reserved 00007 * SPDX-License-Identifier: Apache-2.0 00008 * 00009 * Licensed under the Apache License, Version 2.0 (the "License"); you may 00010 * not use this file except in compliance with the License. 00011 * You may obtain a copy of the License at 00012 * 00013 * http://www.apache.org/licenses/LICENSE-2.0 00014 * 00015 * Unless required by applicable law or agreed to in writing, software 00016 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 00017 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00018 * See the License for the specific language governing permissions and 00019 * limitations under the License. 00020 */ 00021 00022 #ifndef INFO_H 00023 #define INFO_H 00024 00025 #include <stdbool.h> 00026 #include <stdint.h> 00027 00028 #ifdef __cplusplus 00029 extern "C" { 00030 #endif 00031 00032 void info_init(void); 00033 void info_set_uuid_target(uint32_t *uuid_data); 00034 void info_crc_compute(void); 00035 00036 00037 // Get the 48 digit unique ID as a null terminated string. 00038 // This is the string used as the USB serial number. 00039 // This string is made up of the following: 00040 // <board ID><family ID><host ID><hic ID> 00041 const char *info_get_unique_id(void); 00042 00043 // Get the 4 digit board ID as a null terminated string 00044 const char *info_get_board_id(void); 00045 00046 // Get the 32 digit ID of the processor running daplink as a null terminated string 00047 const char *info_get_host_id(void); 00048 00049 // Get the 32 digit ID of the target processor as a null terminated string 00050 const char *info_get_target_id(void); 00051 00052 // Get the 8 digit hic ID as a null terminated string 00053 const char *info_get_hic_id(void); 00054 00055 // Get the 4 digit version ID as a null terminated string 00056 const char *info_get_version(void); 00057 00058 // Get the 12 digit mac as a null terminated string 00059 const char *info_get_mac(void); 00060 00061 00062 // Get the string descriptor for for the unique_id 00063 // This is in the format of a USB string descriptor 00064 // offset 0, size 1, bLength 00065 // offset 1, size 1, bDescriptorType always 3 00066 // offset 2, size n, bString - unicode encoded unique id 00067 const char *info_get_unique_id_string_descriptor(void); 00068 00069 00070 // Check if various regions are present 00071 bool info_get_bootloader_present(void); 00072 bool info_get_interface_present(void); 00073 bool info_get_config_admin_present(void); 00074 bool info_get_config_user_present(void); 00075 00076 // Get the CRCs of various regions. 00077 // The CRC returned is only valid if 00078 // the given region is present. 00079 uint32_t info_get_crc_bootloader(void); 00080 uint32_t info_get_crc_interface(void); 00081 uint32_t info_get_crc_config_admin(void); 00082 uint32_t info_get_crc_config_user(void); 00083 00084 // Get version info as an integer 00085 uint32_t info_get_bootloader_version(void); 00086 uint32_t info_get_interface_version(void); 00087 00088 #ifdef __cplusplus 00089 } 00090 #endif 00091 00092 #endif
Generated on Tue Jul 12 2022 15:37:19 by
