diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-10-31 20:13:29 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-10-31 20:13:29 +0300 |
commit | 9b90cdf445b9893eb93c02317ef87965ec60657f (patch) | |
tree | 4d586fe0b033528dcfaa31477dec2e2cef716c88 /src/bossa | |
parent | c0b1908a673e62e8553264f31057843d11a27bc5 (diff) |
Annotations for static analysis
Diffstat (limited to 'src/bossa')
-rw-r--r-- | src/bossa/Applet.h | 4 | ||||
-rw-r--r-- | src/bossa/BossaFlash.h | 8 | ||||
-rw-r--r-- | src/bossa/Device.h | 6 | ||||
-rw-r--r-- | src/bossa/Samba.h | 14 | ||||
-rw-r--r-- | src/bossa/WordCopyApplet.h | 4 |
5 files changed, 18 insertions, 18 deletions
diff --git a/src/bossa/Applet.h b/src/bossa/Applet.h index 60305c6f..28112472 100644 --- a/src/bossa/Applet.h +++ b/src/bossa/Applet.h @@ -37,9 +37,9 @@ class Applet { public: Applet(Samba& samba, - uint32_t addr, + uint32_t p_addr, const uint8_t* code, - uint32_t size, + uint32_t p_size, uint32_t start, uint32_t stack, uint32_t reset) THROWS(GCodeException); diff --git a/src/bossa/BossaFlash.h b/src/bossa/BossaFlash.h index afc03664..99b66a4e 100644 --- a/src/bossa/BossaFlash.h +++ b/src/bossa/BossaFlash.h @@ -64,17 +64,17 @@ class BossaFlash // manuel: required to rename to avoid clash with CoreN2G names { public: BossaFlash(Samba& samba, - const char* name, + const char *_ecv_array p_name, uint32_t addr, // Flash base address uint32_t pages, // Number of pages uint32_t size, // Page size in bytes uint32_t planes, // Number of flash planes - uint32_t lockRegions, // Number of flash lock regions + uint32_t p_lockRegions, // Number of flash lock regions uint32_t user, // Address in SRAM where the applet and buffers will be placed uint32_t stack) THROWS(GCodeException); // Address in SRAM where the applet stack will be placed virtual ~BossaFlash() {} - const char* name() noexcept { return _name; } + const char *_ecv_array name() noexcept { return _name; } virtual uint32_t address() noexcept { return _addr; } virtual uint32_t pageSize() noexcept { return _size; } @@ -119,7 +119,7 @@ public: protected: Samba& _samba; - const char* _name; + const char *_ecv_array _name; uint32_t _addr; uint32_t _pages; uint32_t _size; diff --git a/src/bossa/Device.h b/src/bossa/Device.h index 755cc9df..452e3ae9 100644 --- a/src/bossa/Device.h +++ b/src/bossa/Device.h @@ -76,20 +76,20 @@ public: #endif }; - Device(Samba& samba) noexcept : _samba(samba), _flash(nullptr), _family(FAMILY_NONE) {} + explicit Device(Samba& samba) noexcept : _samba(samba), _flash(nullptr), _family(FAMILY_NONE) {} virtual ~Device() { delete _flash; } void create() THROWS(GCodeException); Family getFamily() noexcept { return _family; } - BossaFlash* getFlash() noexcept { return _flash; } + BossaFlash* null getFlash() noexcept { return _flash; } void reset() THROWS(GCodeException); private: Samba& _samba; - BossaFlash* _flash; + BossaFlash* null _flash; Family _family; #if ORIGINAL_BOSSA_CODE diff --git a/src/bossa/Samba.h b/src/bossa/Samba.h index e9467b43..e404e01e 100644 --- a/src/bossa/Samba.h +++ b/src/bossa/Samba.h @@ -46,14 +46,14 @@ public: Samba() noexcept; virtual ~Samba(); - bool connect(SerialPort* port, int bps = 115200) noexcept; + bool connect(SerialPort *_ecv_from port, int bps = 115200) noexcept; void disconnect() noexcept; void writeWord(uint32_t addr, uint32_t value) THROWS(GCodeException); uint32_t readWord(uint32_t addr) THROWS(GCodeException); - void write(uint32_t addr, const uint8_t* buffer, int size) THROWS(GCodeException); - void read(uint32_t addr, uint8_t* buffer, int size) THROWS(GCodeException); + void write(uint32_t addr, const uint8_t *_ecv_array buffer, int size) THROWS(GCodeException); + void read(uint32_t addr, uint8_t *_ecv_array buffer, int size) THROWS(GCodeException); void go(uint32_t addr) THROWS(GCodeException); @@ -71,7 +71,7 @@ public: bool canChecksumBuffer() noexcept { return _canChecksumBuffer; } uint32_t checksumBufferSize() noexcept { return 4096; } - uint16_t crc16Calc(const uint8_t *data, int len) noexcept; + uint16_t crc16Calc(const uint8_t *_ecv_array data, int len) noexcept; private: bool _canChipErase; @@ -81,12 +81,12 @@ private: #if DEBUG_BOSSA bool _debug; #endif - SerialPort* _port; + SerialPort *_ecv_from _port; bool init() noexcept; - void writeXmodem(const uint8_t* buffer, int size) THROWS(GCodeException); - void readXmodem(uint8_t* buffer, int size) THROWS(GCodeException); + void writeXmodem(const uint8_t *_ecv_array buffer, int size) THROWS(GCodeException); + void readXmodem(uint8_t *_ecv_array buffer, int size) THROWS(GCodeException); }; diff --git a/src/bossa/WordCopyApplet.h b/src/bossa/WordCopyApplet.h index d04c60be..90d6b2f1 100644 --- a/src/bossa/WordCopyApplet.h +++ b/src/bossa/WordCopyApplet.h @@ -35,8 +35,8 @@ class WordCopyApplet : public Applet { public: - WordCopyApplet(Samba& samba, uint32_t addr) THROWS(GCodeException); - virtual ~WordCopyApplet(); + WordCopyApplet(Samba& samba, uint32_t p_addr) THROWS(GCodeException); + ~WordCopyApplet() override; void setDstAddr(uint32_t dstAddr) THROWS(GCodeException); void setSrcAddr(uint32_t srcAddr) THROWS(GCodeException); |