File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ SOFTWARE.
5555int gpio_mode ;
5656int gpio_direction [120 ];
5757
58- char ctrl_dir [43 ];
59- char ocp_dir [33 ];
58+ char ctrl_dir [CTRL_DIR_MAX ];
59+ char ocp_dir [OCP_DIR_MAX ];
6060
6161int setup_error = 0 ;
6262int module_setup = 0 ;
Original file line number Diff line number Diff line change @@ -42,6 +42,9 @@ using adafruit::bbio::BBIO_err;
4242#define BOARD 10
4343#define BCM 11
4444
45+ #define CTRL_DIR_MAX 50
46+ #define OCP_DIR_MAX 50
47+
4548#define ARRAY_SIZE (a ) (sizeof(a) / sizeof(a[0]))
4649
4750#define FILENAME_BUFFER_SIZE 128
@@ -64,8 +67,8 @@ typedef struct pwm_t {
6467extern int gpio_mode ;
6568extern int gpio_direction [120 ];
6669
67- extern char ctrl_dir [43 ];
68- extern char ocp_dir [33 ];
70+ extern char ctrl_dir [CTRL_DIR_MAX ];
71+ extern char ocp_dir [OCP_DIR_MAX ];
6972
7073BBIO_err get_gpio_number (const char * key , unsigned int * gpio );
7174BBIO_err get_pwm_key (const char * input , char * key );
You can’t perform that action at this time.
0 commit comments