Fixed rxwm setting as it defines the maximum number of received bytes
*before* the interrupt
This commit is contained in:
parent
2a45030414
commit
d6db5f7e04
@ -169,7 +169,7 @@ public:
|
||||
template<size_t SIZE>
|
||||
static bool transfer(std::array<uint8_t, SIZE>& bytes){
|
||||
csmode_reg().mode=2; // HOLD mode
|
||||
rxctrl_reg().rxmark=bytes.size(); // trigger irq if 3 bytes are received;
|
||||
rxctrl_reg().rxmark=bytes.size()-1; // trigger irq if more than 2 bytes are received;
|
||||
ie_reg().rxwm=1;
|
||||
// write data bytes
|
||||
for(size_t i=0; i<bytes.size(); ++i)
|
||||
|
Loading…
Reference in New Issue
Block a user