Пример #1
0
/*!
 * \brief Prints the status text to the console
 * \param io I/O channel to be used
 */
static void PrintStatus(const FSSH1_StdIOType *io) {
  /* list your local status here */
#if 0
  FSSH1_SendStatusStr((unsigned char*)"shell", (unsigned char*)"\r\n", io->stdOut);
  if (SHELL_i2Commands) {
    FSSH1_SendStatusStr((unsigned char*)"  i2c cmd", (unsigned char*)"yes\r\n", io->stdOut);
  } else {
    FSSH1_SendStatusStr((unsigned char*)"  i2c cmd", (unsigned char*)"no\r\n", io->stdOut);
  }
#else
  (void)io;
#endif
}
Пример #2
0
static void RADIO_PrintStatus(const FSSH1_StdIOType *io) {
  short dBm;
  unsigned char link_quality;  /* Holds the link quality of the last received Packet.*/

  FSSH1_SendStatusStr("Radio", "\r\n", io->stdOut);
  FSSH1_SendStatusStr("  transceiver", RADIO_isOn?"on\r\n":"off\r\n", io->stdOut);
  FSSH1_SendStatusStr("  sniffing", RADIO_isSniffing?"on\r\n":"off\r\n", io->stdOut);
  link_quality = SMAC1_MLMELinkQuality();  /* Read the link quality of the last received packet.*/
  dBm = (short)(-(link_quality/2));
  FSSH1_SendStatusStr("  LQ", "", io->stdOut); FSSH1_SendNum16s(dBm, io->stdOut); FSSH1_SendStr(" dBm\r\n", io->stdOut);
  FSSH1_SendStatusStr("  channel", "", io->stdOut); FSSH1_SendNum16u((uint16_t)RADIO_Channel, io->stdOut); FSSH1_SendStr("\r\n", io->stdOut);
  FSSH1_SendStatusStr("  outputPower", "", io->stdOut); FSSH1_SendNum16u((uint16_t)RADIO_OutputPower, io->stdOut); FSSH1_SendStr("\r\n", io->stdOut);
  FSSH1_SendStatusStr("  PAIND", RADIO_PREFIX_STR, io->stdOut); FSSH1_SendStr("\r\n", io->stdOut);
  FSSH1_SendStatusStr("  ACK", RADIO_ACK_STR, io->stdOut); FSSH1_SendStr("\r\n", io->stdOut);
}
Пример #3
0
/*!
 * \brief Prints the status text to the console
 * \param io I/O channel to be used
 */
static void PrintStatus(const FSSH1_StdIOType *io) {
  /* list your local status here */
  FSSH1_SendStatusStr((unsigned char*)"my status", (unsigned char*)"My status text\r\n", io->stdOut);
}