2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
26 #if defined(USE_BOARD_INFO)
27 #include "build/version.h"
29 #include "fc/board_info.h"
32 #include "pg/pg_ids.h"
36 PG_REGISTER_WITH_RESET_FN(boardConfig_t
, boardConfig
, PG_BOARD_CONFIG
, 0);
38 void pgResetFn_boardConfig(boardConfig_t
*boardConfig
)
40 if (boardInformationIsSet()) {
41 strncpy(boardConfig
->manufacturerId
, getManufacturerId(), MAX_MANUFACTURER_ID_LENGTH
+ 1);
42 strncpy(boardConfig
->boardName
, getBoardName(), MAX_BOARD_NAME_LENGTH
+ 1);
43 boardConfig
->boardInformationSet
= true;
45 boardConfig
->boardInformationSet
= false;
48 #if defined(USE_SIGNATURE)
49 if (signatureIsSet()) {
50 memcpy(boardConfig
->signature
, getSignature(), SIGNATURE_LENGTH
);
51 boardConfig
->signatureSet
= true;
53 boardConfig
->signatureSet
= false;
57 #endif // USE_BOARD_INFO: