-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use int16_t for pins instead of int8_t #399
base: master
Are you sure you want to change the base?
Use int16_t for pins instead of int8_t #399
Conversation
(lurker thought) |
Duplicating this comment: adafruit/Adafruit_ILI9341#82 (comment)
|
It's one approach but this library detect pin is available if the number is 0 or more so we need to add some flags to detect no pins.
So? It will become breaking change but I think that it's better to support more than 127 pins.
Range of int8_t is between -128 and 127 so (int8_t) 204 become -54. |
Right, the bit representation is the same. It will be converted to a uint_8t at some point in the SPI library, etc. in STMduino. Could you try that and see if it works? |
I tried but does not work with using released version. #define PIN_LCD_DC PD15
#define PIN_LCD_A_CS PD14
#define PIN_LCD_A_RST PF12
#define PIN_LCD_B_CS PA4
#define PIN_LCD_B_RST PA3
Adafruit_ILI9341 lcdA(PIN_LCD_A_CS, PIN_LCD_DC, PIN_LCD_A_RST);
Adafruit_ILI9341 lcdB((uint8_t)PIN_LCD_B_CS, PIN_LCD_DC, (uint8_t)PIN_LCD_B_RST); |
I wanted use LCD and Adafruit_ILI9341 with using PA4 of STM32F7 as CS pin.
However PA4 is 205 so it cannot be handled with int8_t type so I change type for pins to int16_t.
I could use PA4 as CS pin with this code.
Thank you for sharing useful library.