This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <mcp_can.h> | |
#include <SPI.h> | |
#define lo8(x) (uint8_t)((x) & 0xFF) | |
#define hi8(x) (uint8_t)(((x)>>8) & 0xFF) | |
const int SPI_CS_PIN = 17; // CANBed V1 | |
MCP_CAN CAN(SPI_CS_PIN); // Set CS pin | |
uint8_t checkSum = 0xE2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ReflectionWorker extends StandardPlugin { | |
val name: String = "reflectionWorker" | |
override val description: String = "heavy-lift reflection worker" | |
def init(options: List[String]): List[PluginPhase] = | |
new ReflectionWorkerPhase :: Nil | |
} | |
class ReflectionWorkerPhase extends PluginPhase { | |
import tpd._ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyPhase extends PluginPhase { | |
import tpd._ | |
val phaseName = "overrider" | |
override val runsAfter = Set(Pickler.name) | |
override def transformTypeDef(tree: TypeDef)(implicit ctx: Context): Tree = | |
if tree.isClassDef && !tree.rhs.symbol.isStatic then // only look at classes & traits, not objects | |
OlderNewer