Skip to content

Commit 3252530

Browse files
authored
Merge pull request #9481 from vmedcy/add_cypress_kits
Add Cypress PSoC 6 targets
2 parents e6c2a1d + aebf242 commit 3252530

File tree

663 files changed

+286246
-610
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

663 files changed

+286246
-610
lines changed

features/FEATURE_BLE/targets/TARGET_Cypress/TARGET_CYW43XXX/HCIDriver.cpp

Lines changed: 429 additions & 0 deletions
Large diffs are not rendered by default.

targets/TARGET_Cypress/TARGET_PSOC6/PeripheralPins.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/*
22
* mbed Microcontroller Library
33
* Copyright (c) 2017-2018 Future Electronics
4+
* Copyright (c) 2018-2019 Cypress Semiconductor Corporation
5+
* SPDX-License-Identifier: Apache-2.0
46
*
57
* Licensed under the Apache License, Version 2.0 (the "License");
68
* you may not use this file except in compliance with the License.
Lines changed: 34 additions & 0 deletions
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_clocks();
30+
init_cycfg_peripherals();
31+
init_cycfg_pins();
32+
init_cycfg_platform();
33+
init_cycfg_connectivity();
34+
}
Lines changed: 47 additions & 0 deletions
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_clocks.h"
34+
#include "cycfg_peripherals.h"
35+
#include "cycfg_pins.h"
36+
#include "cycfg_platform.h"
37+
#include "cycfg_connectivity.h"
38+
39+
void init_cycfg_all(void);
40+
41+
42+
#if defined(__cplusplus)
43+
}
44+
#endif
45+
46+
47+
#endif /* CYCFG_H */
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
28+
void init_cycfg_clocks(void)
29+
{
30+
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_16_BIT, 0U);
31+
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_16_BIT, 0U, 999U);
32+
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_16_BIT, 0U);
33+
34+
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_8_BIT, 1U);
35+
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 1U, 7U);
36+
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 1U);
37+
38+
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_8_BIT, 2U);
39+
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 2U, 108U);
40+
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 2U);
41+
42+
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_8_BIT, 3U);
43+
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 3U, 1U);
44+
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 3U);
45+
46+
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_8_BIT, 4U);
47+
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 4U, 255U);
48+
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 4U);
49+
}
Lines changed: 53 additions & 0 deletions
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+
31+
#if defined(__cplusplus)
32+
extern "C" {
33+
#endif
34+
35+
#define peri_0_div_16_0_HW CY_SYSCLK_DIV_16_BIT
36+
#define peri_0_div_16_0_NUM 0U
37+
#define peri_0_div_8_1_HW CY_SYSCLK_DIV_8_BIT
38+
#define peri_0_div_8_1_NUM 1U
39+
#define peri_0_div_8_2_HW CY_SYSCLK_DIV_8_BIT
40+
#define peri_0_div_8_2_NUM 2U
41+
#define peri_0_div_8_3_HW CY_SYSCLK_DIV_8_BIT
42+
#define peri_0_div_8_3_NUM 3U
43+
#define peri_0_div_8_4_HW CY_SYSCLK_DIV_8_BIT
44+
#define peri_0_div_8_4_NUM 4U
45+
46+
void init_cycfg_clocks(void);
47+
48+
#if defined(__cplusplus)
49+
}
50+
#endif
51+
52+
53+
#endif /* CYCFG_CLOCKS_H */
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*******************************************************************************
2+
* File Name: cycfg_connectivity.c
3+
*
4+
* Description:
5+
* Establishes all necessary connections between hardware elements.
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_connectivity.h"
26+
27+
#include "cy_device_headers.h"
28+
29+
void init_cycfg_connectivity(void)
30+
{
31+
HSIOM->AMUX_SPLIT_CTL[2] = HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_AA_SL_Msk |
32+
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_AA_SR_Msk |
33+
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_BB_SL_Msk |
34+
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_BB_SR_Msk;
35+
HSIOM->AMUX_SPLIT_CTL[4] = HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_AA_SL_Msk |
36+
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_AA_SR_Msk |
37+
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_BB_SL_Msk |
38+
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_BB_SR_Msk;
39+
}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
/*******************************************************************************
2+
* File Name: cycfg_connectivity.h
3+
*
4+
* Description:
5+
* Establishes all necessary connections between hardware elements.
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_CONNECTIVITY_H)
26+
#define CYCFG_CONNECTIVITY_H
27+
28+
#if defined(__cplusplus)
29+
extern "C" {
30+
#endif
31+
32+
#include "cycfg_notices.h"
33+
void init_cycfg_connectivity(void);
34+
35+
#define ioss_0_port_11_pin_1_HSIOM P11_1_TCPWM1_LINE_COMPL1
36+
#define ioss_0_port_11_pin_2_HSIOM P11_2_SMIF_SPI_SELECT0
37+
#define ioss_0_port_11_pin_3_HSIOM P11_3_SMIF_SPI_DATA3
38+
#define ioss_0_port_11_pin_4_HSIOM P11_4_SMIF_SPI_DATA2
39+
#define ioss_0_port_11_pin_5_HSIOM P11_5_SMIF_SPI_DATA1
40+
#define ioss_0_port_11_pin_6_HSIOM P11_6_SMIF_SPI_DATA0
41+
#define ioss_0_port_11_pin_7_HSIOM P11_7_SMIF_SPI_CLK
42+
#define ioss_0_port_1_pin_0_HSIOM HSIOM_SEL_AMUXB
43+
#define ioss_0_port_2_pin_0_HSIOM P2_0_SDHC0_CARD_DAT_3TO00
44+
#define ioss_0_port_2_pin_1_HSIOM P2_1_SDHC0_CARD_DAT_3TO01
45+
#define ioss_0_port_2_pin_2_HSIOM P2_2_SDHC0_CARD_DAT_3TO02
46+
#define ioss_0_port_2_pin_3_HSIOM P2_3_SDHC0_CARD_DAT_3TO03
47+
#define ioss_0_port_2_pin_4_HSIOM P2_4_SDHC0_CARD_CMD
48+
#define ioss_0_port_2_pin_5_HSIOM P2_5_SDHC0_CLK_CARD
49+
#define ioss_0_port_3_pin_0_HSIOM P3_0_SCB2_UART_RX
50+
#define ioss_0_port_3_pin_1_HSIOM P3_1_SCB2_UART_TX
51+
#define ioss_0_port_3_pin_2_HSIOM P3_2_SCB2_UART_RTS
52+
#define ioss_0_port_3_pin_3_HSIOM P3_3_SCB2_UART_CTS
53+
#define ioss_0_port_5_pin_0_HSIOM P5_0_SCB5_UART_RX
54+
#define ioss_0_port_5_pin_1_HSIOM P5_1_SCB5_UART_TX
55+
#define ioss_0_port_6_pin_0_HSIOM P6_0_SCB3_I2C_SCL
56+
#define ioss_0_port_6_pin_1_HSIOM P6_1_SCB3_I2C_SDA
57+
#define ioss_0_port_6_pin_4_HSIOM P6_4_CPUSS_SWJ_SWO_TDO
58+
#define ioss_0_port_6_pin_6_HSIOM P6_6_CPUSS_SWJ_SWDIO_TMS
59+
#define ioss_0_port_6_pin_7_HSIOM P6_7_CPUSS_SWJ_SWCLK_TCLK
60+
#define ioss_0_port_7_pin_1_HSIOM HSIOM_SEL_AMUXB
61+
#define ioss_0_port_7_pin_2_HSIOM HSIOM_SEL_AMUXB
62+
#define ioss_0_port_7_pin_7_HSIOM HSIOM_SEL_AMUXB
63+
#define ioss_0_port_8_pin_1_HSIOM HSIOM_SEL_AMUXB
64+
#define ioss_0_port_8_pin_2_HSIOM HSIOM_SEL_AMUXB
65+
#define ioss_0_port_8_pin_3_HSIOM HSIOM_SEL_AMUXB
66+
#define ioss_0_port_8_pin_4_HSIOM HSIOM_SEL_AMUXB
67+
#define ioss_0_port_8_pin_5_HSIOM HSIOM_SEL_AMUXB
68+
#define ioss_0_port_8_pin_6_HSIOM HSIOM_SEL_AMUXB
69+
#define ioss_0_port_8_pin_7_HSIOM HSIOM_SEL_AMUXB
70+
71+
#if defined(__cplusplus)
72+
}
73+
#endif
74+
75+
76+
#endif /* CYCFG_CONNECTIVITY_H */
Lines changed: 30 additions & 0 deletions
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 */

0 commit comments

Comments
 (0)