Skip to content

Commit 9c82706

Browse files
authored
Merge pull request #11434 from romanjoe/pr/cy8ckit_064s2_4343w
Initial addition of files to support CY8CKIT_064S2_4343W target
2 parents 734072f + 27f9cf8 commit 9c82706

40 files changed

+11742
-24
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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_dmas();
32+
init_cycfg_routing();
33+
init_cycfg_peripherals();
34+
init_cycfg_pins();
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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_dmas.h"
36+
#include "cycfg_routing.h"
37+
#include "cycfg_peripherals.h"
38+
#include "cycfg_pins.h"
39+
40+
void init_cycfg_all(void);
41+
42+
43+
#if defined(__cplusplus)
44+
}
45+
#endif
46+
47+
48+
#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,105 @@
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_USB_CLK_DIV_obj =
29+
{
30+
.type = CYHAL_RSC_CLOCK,
31+
.block_num = CYBSP_USB_CLK_DIV_HW,
32+
.channel_num = CYBSP_USB_CLK_DIV_NUM,
33+
};
34+
#endif //defined (CY_USING_HAL)
35+
#if defined (CY_USING_HAL)
36+
const cyhal_resource_inst_t CYBSP_SDIO_DIV_obj =
37+
{
38+
.type = CYHAL_RSC_CLOCK,
39+
.block_num = CYBSP_SDIO_DIV_HW,
40+
.channel_num = CYBSP_SDIO_DIV_NUM,
41+
};
42+
#endif //defined (CY_USING_HAL)
43+
#if defined (CY_USING_HAL)
44+
const cyhal_resource_inst_t CYBSP_CSD_COMM_CLK_DIV_obj =
45+
{
46+
.type = CYHAL_RSC_CLOCK,
47+
.block_num = CYBSP_CSD_COMM_CLK_DIV_HW,
48+
.channel_num = CYBSP_CSD_COMM_CLK_DIV_NUM,
49+
};
50+
#endif //defined (CY_USING_HAL)
51+
#if defined (CY_USING_HAL)
52+
const cyhal_resource_inst_t CYBSP_CSD_CLK_DIV_obj =
53+
{
54+
.type = CYHAL_RSC_CLOCK,
55+
.block_num = CYBSP_CSD_CLK_DIV_HW,
56+
.channel_num = CYBSP_CSD_CLK_DIV_NUM,
57+
};
58+
#endif //defined (CY_USING_HAL)
59+
#if defined (CY_USING_HAL)
60+
const cyhal_resource_inst_t peri_0_div_8_4_obj =
61+
{
62+
.type = CYHAL_RSC_CLOCK,
63+
.block_num = peri_0_div_8_4_HW,
64+
.channel_num = peri_0_div_8_4_NUM,
65+
};
66+
#endif //defined (CY_USING_HAL)
67+
68+
69+
void init_cycfg_clocks(void)
70+
{
71+
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_16_BIT, 0U);
72+
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_16_BIT, 0U, 999U);
73+
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_16_BIT, 0U);
74+
#if defined (CY_USING_HAL)
75+
cyhal_hwmgr_reserve(&CYBSP_USB_CLK_DIV_obj);
76+
#endif //defined (CY_USING_HAL)
77+
78+
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_8_BIT, 0U);
79+
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 0U, 0U);
80+
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 0U);
81+
#if defined (CY_USING_HAL)
82+
cyhal_hwmgr_reserve(&CYBSP_SDIO_DIV_obj);
83+
#endif //defined (CY_USING_HAL)
84+
85+
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_8_BIT, 1U);
86+
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 1U, 7U);
87+
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 1U);
88+
#if defined (CY_USING_HAL)
89+
cyhal_hwmgr_reserve(&CYBSP_CSD_COMM_CLK_DIV_obj);
90+
#endif //defined (CY_USING_HAL)
91+
92+
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_8_BIT, 3U);
93+
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 3U, 255U);
94+
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 3U);
95+
#if defined (CY_USING_HAL)
96+
cyhal_hwmgr_reserve(&CYBSP_CSD_CLK_DIV_obj);
97+
#endif //defined (CY_USING_HAL)
98+
99+
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_8_BIT, 4U);
100+
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 4U, 108U);
101+
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 4U);
102+
#if defined (CY_USING_HAL)
103+
cyhal_hwmgr_reserve(&peri_0_div_8_4_obj);
104+
#endif //defined (CY_USING_HAL)
105+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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_USB_CLK_DIV_ENABLED 1U
39+
#define CYBSP_USB_CLK_DIV_HW CY_SYSCLK_DIV_16_BIT
40+
#define CYBSP_USB_CLK_DIV_NUM 0U
41+
#define CYBSP_SDIO_DIV_ENABLED 1U
42+
#define CYBSP_SDIO_DIV_HW CY_SYSCLK_DIV_8_BIT
43+
#define CYBSP_SDIO_DIV_NUM 0U
44+
#define CYBSP_CSD_COMM_CLK_DIV_ENABLED 1U
45+
#define CYBSP_CSD_COMM_CLK_DIV_HW CY_SYSCLK_DIV_8_BIT
46+
#define CYBSP_CSD_COMM_CLK_DIV_NUM 1U
47+
#define CYBSP_CSD_CLK_DIV_ENABLED 1U
48+
#define CYBSP_CSD_CLK_DIV_HW CY_SYSCLK_DIV_8_BIT
49+
#define CYBSP_CSD_CLK_DIV_NUM 3U
50+
#define peri_0_div_8_4_ENABLED 1U
51+
#define peri_0_div_8_4_HW CY_SYSCLK_DIV_8_BIT
52+
#define peri_0_div_8_4_NUM 4U
53+
54+
#if defined (CY_USING_HAL)
55+
extern const cyhal_resource_inst_t CYBSP_USB_CLK_DIV_obj;
56+
#endif //defined (CY_USING_HAL)
57+
#if defined (CY_USING_HAL)
58+
extern const cyhal_resource_inst_t CYBSP_SDIO_DIV_obj;
59+
#endif //defined (CY_USING_HAL)
60+
#if defined (CY_USING_HAL)
61+
extern const cyhal_resource_inst_t CYBSP_CSD_COMM_CLK_DIV_obj;
62+
#endif //defined (CY_USING_HAL)
63+
#if defined (CY_USING_HAL)
64+
extern const cyhal_resource_inst_t CYBSP_CSD_CLK_DIV_obj;
65+
#endif //defined (CY_USING_HAL)
66+
#if defined (CY_USING_HAL)
67+
extern const cyhal_resource_inst_t peri_0_div_8_4_obj;
68+
#endif //defined (CY_USING_HAL)
69+
70+
void init_cycfg_clocks(void);
71+
72+
#if defined(__cplusplus)
73+
}
74+
#endif
75+
76+
77+
#endif /* CYCFG_CLOCKS_H */

0 commit comments

Comments
 (0)