Moving cpp files to iwram_code directory

This commit is contained in:
Rodrigo Alfonso
2025-02-10 20:40:30 -03:00
parent 42b41f84ff
commit cf689a4708
5 changed files with 9 additions and 11 deletions

View File

@@ -310,7 +310,7 @@ You can update these values at any time without creating a new instance:
- `LINK_WIRELESS_MAX_SERVER_TRANSFER_LENGTH` and `LINK_WIRELESS_MAX_CLIENT_TRANSFER_LENGTH`: to set the biggest allowed transfer per timer tick. Higher values will use the bandwidth more efficiently but also consume more CPU! These values must be in the range `[6;21]` for servers and `[2;4]` for clients. The default values are `11` and `4`, but you might want to set them a bit lower to reduce CPU usage.
- This is measured in words (1 message = 1 halfword). One word is used as a header, so a max transfer length of 11 could transfer up to 20 messages.
- `LINK_WIRELESS_PUT_ISR_IN_IWRAM`: to put critical functions in IWRAM, which can significantly improve performance due to its faster access. This is disabled by default to conserve IWRAM space, which is limited, but it's enabled in demos to showcase its performance benefits.
- If you enable this, make sure that `LinkWireless.cpp` gets compiled! For example, in a Makefile-based project, verify that the file is in your `SRCDIRS` list.
- If you enable this, make sure that `lib/iwram_code/LinkWireless.cpp` gets compiled! For example, in a Makefile-based project, verify that the directory is in your `SRCDIRS` list.
- Depending on how much IWRAM you have available, you might want to tweak these knobs:
* `LINK_WIRELESS_PUT_ISR_IN_IWRAM_SERIAL`: (default: `1`) Put the SERIAL ISR in IWRAM (recommended, since this handler runs ~20 times per frame)
* `LINK_WIRELESS_PUT_ISR_IN_IWRAM_TIMER`: (default: `1`) Put the TIMER ISR in IWRAM (not that necessary)

View File

@@ -43,9 +43,9 @@ LINK_VERSION_TAG LINK_IR_VERSION = "vLinkIR/v8.0.0";
/**
* @brief A driver for the Infrared Adapter (AGB-006).
* \warning If you enable this, make sure that `LinkIR.cpp` gets compiled!
* For example, in a Makefile-based project, verify that the file is in your
* `SRCDIRS` list.
* \warning If you enable this, make sure that `lib/iwram_code/LinkIR.cpp` gets
* compiled! For example, in a Makefile-based project, verify that the directory
* is in your `SRCDIRS` list.
*/
class LinkIR {
private:

View File

@@ -97,9 +97,9 @@
* @brief Put Interrupt Service Routines (ISR) in IWRAM (uncomment to enable).
* This can significantly improve performance due to its faster access, but it's
* disabled by default to conserve IWRAM space, which is limited.
* \warning If you enable this, make sure that `LinkWireless.cpp` gets compiled!
* For example, in a Makefile-based project, verify that the file is in your
* `SRCDIRS` list.
* \warning If you enable this, make sure that `lib/iwram_code/LinkWireless.cpp`
* gets compiled! For example, in a Makefile-based project, verify that the
* directory is in your `SRCDIRS` list.
*/
// #define LINK_WIRELESS_PUT_ISR_IN_IWRAM
#endif

View File

@@ -1,4 +1,4 @@
#include "LinkIR.hpp"
#include "../LinkIR.hpp"
// To modulate a signal at 38kHz, we need to stay 13.15µs LOW and 13.15µs HIGH.
// 38kHz signal => 38000/second =>
@@ -142,5 +142,3 @@ LINK_CODE_IWRAM bool LinkIR::receive(u16 pulses[],
stopCount();
return pulseIndex > 0;
}
// TODO: MOVE TO iwram_code folder

View File

@@ -1,4 +1,4 @@
#include "LinkWireless.hpp"
#include "../LinkWireless.hpp"
#ifdef LINK_WIRELESS_PUT_ISR_IN_IWRAM