Day39 Log - IIO Capability Exposure¶
📅 Summary¶
Implemented capability exposure for sampling frequency.
✅ Achievements¶
- Added mapping table for sampling frequency
- Separated hardware register values from user-visible Hz
- Implemented
sampling_frequency_available - Switched validation to table-based lookup
- Verified behavior with FIFO + trigger buffer
🔍 Observations¶
Capability Output¶
Valid Write¶
Result:
- Success
Invalid Write¶
Result:
- Rejected with
-EINVAL
Integration Test¶
- FIFO mode works as expected
- Trigger buffer unaffected
- No regression from Day38
⚠️ Notes¶
0is defined as:- disable periodic sampling
- does NOT imply one-shot
- one-shot behavior to be designed later
🧠 Learnings¶
- Capability exposure improves usability
- Table-based design avoids duplicated logic
- Kernel prefers explicit capability reporting over trial-and-error
🚀 Next Steps¶
- Mode design (FIFO / DRDY / idle)
- One-shot acquisition design
- Further abstraction of control plane