Skip to content
Snippets Groups Projects
Commit 319a1565 authored by Micah Elizabeth Scott's avatar Micah Elizabeth Scott
Browse files

Centralize retry count settings

parent a4ecc6c7
No related branches found
No related tags found
No related merge requests found
...@@ -60,7 +60,7 @@ public: ...@@ -60,7 +60,7 @@ public:
bool memStoreAndVerify(uint32_t addr, uint32_t *data, unsigned count); bool memStoreAndVerify(uint32_t addr, uint32_t *data, unsigned count);
// Poll for an expected value // Poll for an expected value
bool memPoll(unsigned addr, uint32_t &data, uint32_t mask, uint32_t expected, unsigned retries = 32); bool memPoll(unsigned addr, uint32_t &data, uint32_t mask, uint32_t expected, unsigned retries = DEFAULT_RETRIES);
private: private:
uint8_t clockPin, dataPin; uint8_t clockPin, dataPin;
...@@ -99,8 +99,8 @@ protected: ...@@ -99,8 +99,8 @@ protected:
bool apRead(unsigned addr, uint32_t &data); bool apRead(unsigned addr, uint32_t &data);
// Poll for an expected value // Poll for an expected value
bool dpReadPoll(unsigned addr, uint32_t &data, uint32_t mask, uint32_t expected, unsigned retries = 32); bool dpReadPoll(unsigned addr, uint32_t &data, uint32_t mask, uint32_t expected, unsigned retries = DEFAULT_RETRIES);
bool apReadPoll(unsigned addr, uint32_t &data, uint32_t mask, uint32_t expected, unsigned retries = 32); bool apReadPoll(unsigned addr, uint32_t &data, uint32_t mask, uint32_t expected, unsigned retries = DEFAULT_RETRIES);
// Individual initialization steps (already included in begin) // Individual initialization steps (already included in begin)
bool getIDCODE(uint32_t &idcode); bool getIDCODE(uint32_t &idcode);
...@@ -134,4 +134,6 @@ protected: ...@@ -134,4 +134,6 @@ protected:
MEM_DRW = 0x0C, MEM_DRW = 0x0C,
MEM_IDR = 0xFC, MEM_IDR = 0xFC,
}; };
static const unsigned DEFAULT_RETRIES = 50;
}; };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment