|
| 1 | +/******************************************************************************* |
| 2 | +* @file cy8ckit.c |
| 3 | +* @brief Board ID definitions for KitProg3 devices. |
| 4 | +* |
| 5 | +******************************************************************************** |
| 6 | +* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company) |
| 7 | +* or an affiliate of Cypress Semiconductor Corporation. |
| 8 | +* |
| 9 | +* Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 10 | +* not use this file except in compliance with the License. |
| 11 | +* You may obtain a copy of the License at |
| 12 | +* |
| 13 | +* http://www.apache.org/licenses/LICENSE-2.0 |
| 14 | +* |
| 15 | +* Unless required by applicable law or agreed to in writing, software |
| 16 | +* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 17 | +* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 18 | +* See the License for the specific language governing permissions and |
| 19 | +* limitations under the License. |
| 20 | +*****************************************************************************/ |
| 21 | + |
| 22 | +#include "target_board.h" |
| 23 | +#include "target_family.h" |
| 24 | +#include "kit_utils.h" |
| 25 | + |
| 26 | +// Called in main_task() to init before USB and files are configured |
| 27 | +static void prerun_board_config(void) |
| 28 | +{ |
| 29 | + // Define board ID |
| 30 | + define_board_id(); |
| 31 | + |
| 32 | + //Reset target |
| 33 | + (void)target_set_state(RESET_RUN); |
| 34 | +} |
| 35 | + |
| 36 | + |
| 37 | +// Default Daplink board_info |
| 38 | +// The g_board_info also defined in target_board.c but with __attribute__((weak)) |
| 39 | +// coverity[misra_c_2012_rule_8_6_violation] |
| 40 | +const board_info_t g_board_info = |
| 41 | +{ |
| 42 | + .info_version = (uint16_t)kBoardInfoVersion, |
| 43 | + .board_id = "19FF", |
| 44 | + .family_id = (uint16_t)kCypress_psoc6_FamilyID, |
| 45 | + .target_cfg = &target_device, |
| 46 | + .prerun_board_config = prerun_board_config, |
| 47 | + .flags = (uint32_t)kEnablePageErase |
| 48 | +}; |
| 49 | + |
0 commit comments