mattairtech / EEPROM_CAT25

Driver for On Semiconductor CAT25 SPI EEPROM chips for AVR, SAM3X (Due), and SAM M0+ (SAMD, SAML, SAMC) microcontrollers on the Arduino platform.
6 stars 4 forks source link

Missing const on method parameters #2

Open matthijskooijman opened 5 years ago

matthijskooijman commented 5 years ago

The writeBlock and writePage methods have a void* argument for the buffer to read from. Since this buffer will not be written to, it should really be typed const void*. Without this, code that does handle a const pointer cannot call these methods on such a buffer without doing a typecast (that reduces the type safety provided by the compiler).