bug: pin_write macro used undefined identifier LATA2, never actually toggled DATA pin #35
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wait-to-fix
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
daru/PICsense#35
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The CONCAT-based pin_write macro expanded CONCAT(LATA, 2) to LATA2, but LATA2 is not a defined identifier in the XC8 DFP — the correct name is LATAbits.LATA2. This meant pin_write wrote to an undefined variable, the DATA pin never actually toggled, and no RF energy was produced. Fixed with indirection-layer bitfield accessors.
Fixed in PR #39: pin_write macros rewritten with indirection layer (_pin_write_impl → LATAbits.LATA##p) so CONCAT produces valid XC8 DFP identifiers.