Skip to content

Commit c094ad8

Browse files
authored
Merge pull request #11561 from kyle-cypress/pr/target-063-ble
Add TARGET_CY8CPROTO_063_BLE
2 parents 489c30f + 1b21612 commit c094ad8

31 files changed

+7150
-16
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*******************************************************************************
2+
* File Name: cycfg.c
3+
*
4+
* Description:
5+
* Wrapper function to initialize all generated code.
6+
* This file was automatically generated and should not be modified.
7+
*
8+
********************************************************************************
9+
* Copyright 2017-2019 Cypress Semiconductor Corporation
10+
* SPDX-License-Identifier: Apache-2.0
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the "License");
13+
* you may not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an "AS IS" BASIS,
20+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
********************************************************************************/
24+
25+
#include "cycfg.h"
26+
27+
void init_cycfg_all(void)
28+
{
29+
init_cycfg_system();
30+
init_cycfg_clocks();
31+
init_cycfg_routing();
32+
init_cycfg_peripherals();
33+
init_cycfg_pins();
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*******************************************************************************
2+
* File Name: cycfg.h
3+
*
4+
* Description:
5+
* Simple wrapper header containing all generated files.
6+
* This file was automatically generated and should not be modified.
7+
*
8+
********************************************************************************
9+
* Copyright 2017-2019 Cypress Semiconductor Corporation
10+
* SPDX-License-Identifier: Apache-2.0
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the "License");
13+
* you may not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an "AS IS" BASIS,
20+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
********************************************************************************/
24+
25+
#if !defined(CYCFG_H)
26+
#define CYCFG_H
27+
28+
#if defined(__cplusplus)
29+
extern "C" {
30+
#endif
31+
32+
#include "cycfg_notices.h"
33+
#include "cycfg_system.h"
34+
#include "cycfg_clocks.h"
35+
#include "cycfg_routing.h"
36+
#include "cycfg_peripherals.h"
37+
#include "cycfg_pins.h"
38+
39+
void init_cycfg_all(void);
40+
41+
42+
#if defined(__cplusplus)
43+
}
44+
#endif
45+
46+
47+
#endif /* CYCFG_H */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*******************************************************************************
2+
* File Name: cycfg.timestamp
3+
*
4+
* Description:
5+
* Sentinel file for determining if generated source is up to date.
6+
* This file was automatically generated and should not be modified.
7+
*
8+
********************************************************************************
9+
* Copyright 2017-2019 Cypress Semiconductor Corporation
10+
* SPDX-License-Identifier: Apache-2.0
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the "License");
13+
* you may not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an "AS IS" BASIS,
20+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
********************************************************************************/
24+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*******************************************************************************
2+
* File Name: cycfg_clocks.c
3+
*
4+
* Description:
5+
* Clock configuration
6+
* This file was automatically generated and should not be modified.
7+
*
8+
********************************************************************************
9+
* Copyright 2017-2019 Cypress Semiconductor Corporation
10+
* SPDX-License-Identifier: Apache-2.0
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the "License");
13+
* you may not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an "AS IS" BASIS,
20+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
********************************************************************************/
24+
25+
#include "cycfg_clocks.h"
26+
27+
#if defined (CY_USING_HAL)
28+
const cyhal_resource_inst_t CYBSP_I2C_CLK_DIV_obj =
29+
{
30+
.type = CYHAL_RSC_CLOCK,
31+
.block_num = CYBSP_I2C_CLK_DIV_HW,
32+
.channel_num = CYBSP_I2C_CLK_DIV_NUM,
33+
};
34+
#endif //defined (CY_USING_HAL)
35+
36+
37+
void init_cycfg_clocks(void)
38+
{
39+
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_8_BIT, 1U);
40+
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 1U, 3U);
41+
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 1U);
42+
#if defined (CY_USING_HAL)
43+
cyhal_hwmgr_reserve(&CYBSP_I2C_CLK_DIV_obj);
44+
#endif //defined (CY_USING_HAL)
45+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*******************************************************************************
2+
* File Name: cycfg_clocks.h
3+
*
4+
* Description:
5+
* Clock configuration
6+
* This file was automatically generated and should not be modified.
7+
*
8+
********************************************************************************
9+
* Copyright 2017-2019 Cypress Semiconductor Corporation
10+
* SPDX-License-Identifier: Apache-2.0
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the "License");
13+
* you may not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an "AS IS" BASIS,
20+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
********************************************************************************/
24+
25+
#if !defined(CYCFG_CLOCKS_H)
26+
#define CYCFG_CLOCKS_H
27+
28+
#include "cycfg_notices.h"
29+
#include "cy_sysclk.h"
30+
#if defined (CY_USING_HAL)
31+
#include "cyhal_hwmgr.h"
32+
#endif //defined (CY_USING_HAL)
33+
34+
#if defined(__cplusplus)
35+
extern "C" {
36+
#endif
37+
38+
#define CYBSP_I2C_CLK_DIV_ENABLED 1U
39+
#define CYBSP_I2C_CLK_DIV_HW CY_SYSCLK_DIV_8_BIT
40+
#define CYBSP_I2C_CLK_DIV_NUM 1U
41+
42+
#if defined (CY_USING_HAL)
43+
extern const cyhal_resource_inst_t CYBSP_I2C_CLK_DIV_obj;
44+
#endif //defined (CY_USING_HAL)
45+
46+
void init_cycfg_clocks(void);
47+
48+
#if defined(__cplusplus)
49+
}
50+
#endif
51+
52+
53+
#endif /* CYCFG_CLOCKS_H */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*******************************************************************************
2+
* File Name: cycfg_notices.h
3+
*
4+
* Description:
5+
* Contains warnings and errors that occurred while generating code for the
6+
* design.
7+
* This file was automatically generated and should not be modified.
8+
*
9+
********************************************************************************
10+
* Copyright 2017-2019 Cypress Semiconductor Corporation
11+
* SPDX-License-Identifier: Apache-2.0
12+
*
13+
* Licensed under the Apache License, Version 2.0 (the "License");
14+
* you may not use this file except in compliance with the License.
15+
* You may obtain a copy of the License at
16+
*
17+
* http://www.apache.org/licenses/LICENSE-2.0
18+
*
19+
* Unless required by applicable law or agreed to in writing, software
20+
* distributed under the License is distributed on an "AS IS" BASIS,
21+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22+
* See the License for the specific language governing permissions and
23+
* limitations under the License.
24+
********************************************************************************/
25+
26+
#if !defined(CYCFG_NOTICES_H)
27+
#define CYCFG_NOTICES_H
28+
29+
30+
#endif /* CYCFG_NOTICES_H */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*******************************************************************************
2+
* File Name: cycfg_peripherals.c
3+
*
4+
* Description:
5+
* Peripheral Hardware Block configuration
6+
* This file was automatically generated and should not be modified.
7+
*
8+
********************************************************************************
9+
* Copyright 2017-2019 Cypress Semiconductor Corporation
10+
* SPDX-License-Identifier: Apache-2.0
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the "License");
13+
* you may not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an "AS IS" BASIS,
20+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
********************************************************************************/
24+
25+
#include "cycfg_peripherals.h"
26+
27+
#if defined (CY_USING_HAL)
28+
const cyhal_resource_inst_t bless_0_obj =
29+
{
30+
.type = CYHAL_RSC_BLESS,
31+
.block_num = 0U,
32+
.channel_num = 0U,
33+
};
34+
#endif //defined (CY_USING_HAL)
35+
const cy_stc_scb_ezi2c_config_t CYBSP_I2C_config =
36+
{
37+
.numberOfAddresses = CY_SCB_EZI2C_ONE_ADDRESS,
38+
.slaveAddress1 = 8U,
39+
.slaveAddress2 = 0U,
40+
.subAddressSize = CY_SCB_EZI2C_SUB_ADDR16_BITS,
41+
.enableWakeFromSleep = false,
42+
};
43+
#if defined (CY_USING_HAL)
44+
const cyhal_resource_inst_t CYBSP_I2C_obj =
45+
{
46+
.type = CYHAL_RSC_SCB,
47+
.block_num = 8U,
48+
.channel_num = 0U,
49+
};
50+
#endif //defined (CY_USING_HAL)
51+
52+
53+
void init_cycfg_peripherals(void)
54+
{
55+
#if defined (CY_USING_HAL)
56+
cyhal_hwmgr_reserve(&bless_0_obj);
57+
#endif //defined (CY_USING_HAL)
58+
59+
Cy_SysClk_PeriphAssignDivider(PCLK_SCB8_CLOCK, CY_SYSCLK_DIV_8_BIT, 1U);
60+
#if defined (CY_USING_HAL)
61+
cyhal_hwmgr_reserve(&CYBSP_I2C_obj);
62+
#endif //defined (CY_USING_HAL)
63+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/*******************************************************************************
2+
* File Name: cycfg_peripherals.h
3+
*
4+
* Description:
5+
* Peripheral Hardware Block configuration
6+
* This file was automatically generated and should not be modified.
7+
*
8+
********************************************************************************
9+
* Copyright 2017-2019 Cypress Semiconductor Corporation
10+
* SPDX-License-Identifier: Apache-2.0
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the "License");
13+
* you may not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an "AS IS" BASIS,
20+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
********************************************************************************/
24+
25+
#if !defined(CYCFG_PERIPHERALS_H)
26+
#define CYCFG_PERIPHERALS_H
27+
28+
#include "cycfg_notices.h"
29+
#include "cy_scb_ezi2c.h"
30+
#include "cy_sysclk.h"
31+
#if defined (CY_USING_HAL)
32+
#include "cyhal_hwmgr.h"
33+
#endif //defined (CY_USING_HAL)
34+
35+
#if defined(__cplusplus)
36+
extern "C" {
37+
#endif
38+
39+
#define bless_0_ENABLED 1U
40+
#define CY_BLE_CORE_CORTEX_M4 4U
41+
#define CY_BLE_CORE_CORTEX_M0P 0U
42+
#define CY_BLE_CORE_DUAL 255U
43+
#ifndef CY_BLE_CORE
44+
#define CY_BLE_CORE 4U
45+
#endif
46+
#define CY_BLE_IRQ bless_interrupt_IRQn
47+
#define CYBSP_I2C_ENABLED 1U
48+
#define CYBSP_I2C_HW SCB8
49+
#define CYBSP_I2C_IRQ scb_8_interrupt_IRQn
50+
51+
#if defined (CY_USING_HAL)
52+
extern const cyhal_resource_inst_t bless_0_obj;
53+
#endif //defined (CY_USING_HAL)
54+
extern const cy_stc_scb_ezi2c_config_t CYBSP_I2C_config;
55+
#if defined (CY_USING_HAL)
56+
extern const cyhal_resource_inst_t CYBSP_I2C_obj;
57+
#endif //defined (CY_USING_HAL)
58+
59+
void init_cycfg_peripherals(void);
60+
61+
#if defined(__cplusplus)
62+
}
63+
#endif
64+
65+
66+
#endif /* CYCFG_PERIPHERALS_H */

0 commit comments

Comments
 (0)