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
/** | |
* \file at86rf212.h | |
* | |
* \brief AT86RF212 registers description and interface | |
* | |
* Copyright (C) 2012 Atmel Corporation. All rights reserved. | |
* | |
* \asf_license_start | |
* | |
* Redistribution and use in source and binary forms, with or without |
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
/** | |
* \file atmega128rfa1.h | |
* | |
* \brief ATMEGA128RFA1 registers description | |
* | |
* Copyright (C) 2012 Atmel Corporation. All rights reserved. | |
* | |
* \asf_license_start | |
* | |
* Redistribution and use in source and binary forms, with or without |
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
/** | |
* \file phy.h | |
* | |
* \brief ATMEGA128RFA1 PHY interface | |
* | |
* Copyright (C) 2012 Atmel Corporation. All rights reserved. | |
* | |
* \asf_license_start | |
* | |
* Redistribution and use in source and binary forms, with or without |
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
/** | |
* \file phy.h | |
* | |
* \brief AT86RF212 PHY interface | |
* | |
* Copyright (C) 2012 Atmel Corporation. All rights reserved. | |
* | |
* \asf_license_start | |
* | |
* Redistribution and use in source and binary forms, with or without |
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
char buf[128]; | |
uint32_t time = millis(); | |
int i; | |
int timeout = 3000; | |
while (millis() - time < timeout) { | |
if (Serial.available() > 0) { | |
buf[i] = Serial.read(); | |
Serial1.write(buf[i]); | |
if (i > 0 && buf[i-1] == '>' && buf[i] == ' ') { |
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
static void digitalPinEventHandler(uint8_t pin, int8_t value, int8_t mode) { | |
uint32_t time = millis(); | |
char buf[32]; | |
if (findscript("event.digital")) { | |
String callback = "event.digital(" + String(pin) + "," + String(value) + "," + String(mode) + ")"; | |
callback.toCharArray(buf, callback.length() + 1); | |
int ret1 = doCommand(buf); | |
} |
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
report.appendSprintf("[%d,[%d,%d],[\"%s\",%s]]", | |
keyMap("custom", 0), | |
keyMap("name", 0), | |
keyMap("custom", 0), | |
name, | |
getstringarg(2)); |
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
var serialport = require('serialport'); | |
var bindexof = require('buffer-indexof'); | |
var ready = new Buffer("> "); | |
function die(err) | |
{ | |
console.log(err); | |
process.exit(1); | |
} |
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
void prompt(void) { | |
char buf[IDLEN+1]; | |
#if defined(TINY_BUILD) | |
msgp(M_prompt); | |
#else | |
// Run the script named "prompt" if there is one else print "> " | |
strncpy_P(buf, getmsg(M_promptid), IDLEN); // get the name "prompt" in our cmd buf | |
if (findscript(buf)) doCommand(buf); | |
else msgp(M_prompt); // else print default prompt |
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
///////////////////////////// | |
// | |
// runBitlash | |
// | |
// This is the main entry point where the main loop gives Bitlash cycles | |
// Call this frequently from loop() | |
// | |
void runBitlash(void) { | |
// Pipe the serial input into the command handler. Read up to 12 |