Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] utility/Due/RF24_arch_config.h not needed? #752

Closed
2bndy5 opened this issue Mar 22, 2021 · 3 comments · Fixed by #750
Closed

[Question] utility/Due/RF24_arch_config.h not needed? #752

2bndy5 opened this issue Mar 22, 2021 · 3 comments · Fixed by #750
Labels

Comments

@2bndy5
Copy link
Member

2bndy5 commented Mar 22, 2021

I couldn't find where the Arduino Due support file /utility/Due/RF24_arch_config.h file is/was getting included. There's no following snippet in the /RF24_config.h

#if defined (ARDUINO_SAM_DUE)
    // ARDUINO_SAM_DUE is defined using CLI args (-DARDUINO_SAM_DUE) at compile time
    #include "utility/Due/RF24_arch_config.h"
#endif

So, against my better nature, I went out of my way to break Due support by commenting out everything in /utility/Due/RF24_arch_config.h and un-commenting SERIAL_DEBUG in /RF24_config.h (& also called printDetails() in GettingStarted.ino)... It still compiles the same as before (I can't break Due support if I tried?! 😆 ) I suspect printf.h doesn't work for the Due either (judging from the ArduinoCore-SAM repo), but it might (using sprintf() from avr/pgmspace.h).

@TMRh20 I have a feeling I hit yet another relic from maniacBug days.

@TMRh20
Copy link
Member

TMRh20 commented Mar 22, 2021 via email

@2bndy5
Copy link
Member Author

2bndy5 commented Mar 22, 2021

Actually pgmspace was added back into the core in 2013. It now gets included in RF24_config.h (using ARDUINO_SAM_DUE). Since I overloaded begin(), I may have reintroduced the extended CSN functionality, but csn() (and any calls to SPI.transfer()) needs extra intuition about this. I thought I left the Due SPI support alone (using the useless arch_config file), but clearly I need to single out the Due in RF24_config.h and in RF24.cpp. Currently, it should work as usual without calling the overloaded begin().

2bndy5 added a commit that referenced this issue Mar 23, 2021
@2bndy5
Copy link
Member Author

2bndy5 commented Mar 23, 2021

I started re-implementing the Due's extended SPI feature, but it made the code really messy and grew the compile size quite a bit. It's not like the Due doesn't have the capacity, but we're going for "optimization" here.

I also excluded #743 from Due support (properly this time) in RF24_config.h because the Due core's SPI library only supports 1 SPI bus (opposed to what the pinout may suggest).

I'm going to remove the Due arch_config file to avoid any further confusion in the future.

@2bndy5 2bndy5 linked a pull request Mar 23, 2021 that will close this issue
kripton pushed a commit to kripton/RF24 that referenced this issue Apr 10, 2021
convert _SPI calls to pointers where applicable

typo made BCM driver fail

overload begin() and amended docs about begin()

fix faulty #ifdef logic

doxygen v1.9.1 deprecated COLS_IN_ALPHA_INDEX tag

bump version to v1.4.0

exclude only RF24_LINUX

apply ptr treatment to Teensy, LittleWire, & Due

trigger ArduinoCLI action

doxygen action shouldn't create a docs folder

no need to specify output dir in doxygen action

make my life simpler: use new RF24_SPI_PTR macro

trigger ArduinoCLI action

forgot about c'tor; fix 2-space indent in begin()

abstract SPI::begin() from _init_pins()

adjust csn_pin before SPI.begin() on BCM driver

conforming whitespace

add printf.h fix from @TonioChingon in nRF24#739

rename atxmega.md & add link to supported product

add Due to ArduinoCLI action

fix teensy support; add PIO CI for teensy

[PIO CI] use quoted matrix entries

[PIO CI] use single quotes?

I hate YML

Gimme that badge

add MRAA to Linux CI action

typo

[Linux CI] MRAA install needs special permission

try with "sudo bash -c"

[Linux CI] MRAA not cross compiling (I think)

add example code snippets to Arduino support pg

doc typos

Due can't use SPI_PTR; delete ATXMEGA/readme.md
(use docs/atxmega.md instead)

fix nRF24#414; note need mbed example in arduino.md

fix printf() only for adafruit/ArduinoCore-SAMD

add msg about COMMON_ISSUES to README

add estimated mbed example to arduino.md

avr/pgmspace.h was added to Due core in 2013

oops, undo my testing change

remove useless Due config file nRF24#752

ammend support for SPI_UART in csn()

Confirm working 2nd SPI bus on esp8266 nRF24#648

fix indent

c-n-p artifact; more indent inconcsistencies

comment out theroretical example snippets

add pinout img from RF24Audio repo

doxygen sux at reading imgs

implement nRF24#539

my CnP skills are lacking

need to test py wrapper

[py_wrap] begin fails to compile

[py wrap] oops left the old begin still in there

[py wrap] use thin wrapper for begin_w/_pins

[pr wrap] try explicit begin(void)

boost.py docs suck

[py wrap] try using same name for begin(pin, pin)

[py wrap] c'tor overload is bad

[py wrap] "optional<>" template didn't take

[py wrap] unmatched parenthesis

advise that teensy doesn't need overloaded begin()

docs review
2bndy5 added a commit that referenced this issue Apr 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants