File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed
targets/TARGET_Cypress/TARGET_PSOC6 Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 23
23
#include "cybsp_types.h"
24
24
25
25
// Pin Modes
26
- #define PullNone CYHAL_GPIO_DRIVE_STRONG
26
+ #define PullNone CYHAL_GPIO_DRIVE_PULL_NONE
27
27
#define PullDefault CYHAL_GPIO_DRIVE_NONE
28
28
#define PullDown CYHAL_GPIO_DRIVE_PULLDOWN
29
29
#define PullUp CYHAL_GPIO_DRIVE_PULLUP
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ typedef enum {
79
79
CYHAL_GPIO_DRIVE_OPENDRAINDRIVESHIGH , /**< Open-drain, Drives High */
80
80
CYHAL_GPIO_DRIVE_STRONG , /**< Strong output */
81
81
CYHAL_GPIO_DRIVE_PULLUPDOWN , /**< Pull-up and pull-down resistors */
82
+ CYHAL_GPIO_DRIVE_PULL_NONE , /**< No Pull-up or pull-down resistors */
82
83
} cyhal_gpio_drive_mode_t ;
83
84
84
85
/** GPIO callback function type */
Original file line number Diff line number Diff line change @@ -105,6 +105,16 @@ static uint32_t cyhal_gpio_convert_drive_mode(cyhal_gpio_drive_mode_t drive_mode
105
105
case CYHAL_GPIO_DRIVE_PULLUPDOWN :
106
106
drvMode = CY_GPIO_DM_PULLUP_DOWN ;
107
107
break ;
108
+ case CYHAL_GPIO_DRIVE_PULL_NONE :
109
+ if (direction == CYHAL_GPIO_DIR_OUTPUT || direction == CYHAL_GPIO_DIR_BIDIRECTIONAL )
110
+ {
111
+ drvMode = CY_GPIO_DM_STRONG ;
112
+ }
113
+ else
114
+ {
115
+ drvMode = CY_GPIO_DM_HIGHZ ;
116
+ }
117
+ break ;
108
118
default :
109
119
CY_ASSERT (false);
110
120
drvMode = CY_GPIO_DM_HIGHZ ;
You can’t perform that action at this time.
0 commit comments