Arduino Radio Library  0.9
A set of Arduino libraries to control diverse FM radio receiver chips in Arduino projects.
Classes | Macros | Typedefs | Enumerations
radio.h File Reference

Library header file for the radio libraries to control radio chips. More...

#include <arduino.h>
#include <Wire.h>

Go to the source code of this file.

Classes

struct  RADIO_INFO
 A structure that contains information about the radio features from the chip. More...
 
struct  AUDIO_INFO
 a structure that contains information about the audio features More...
 
class  RADIO
 Library to control radio chips in general. This library acts as a base library for the chip specific implementations. More...
 

Macros

#define DEBUG_STR(txt)   if (_debugEnabled) { Serial.println(txt); }
 Used for Debugging text information. More...
 
#define DEBUG_VAL(label, val)   if (_debugEnabled) { Serial.print(label); Serial.print(':'); Serial.println(val); }
 Used for Debugging function entries without parameters. More...
 
#define DEBUG_VALX(label, val)   if (_debugEnabled) { Serial.print(label); Serial.print(':'); Serial.println(val, HEX); }
 
#define DEBUG_FUNC0(fn)   if (_debugEnabled) { Serial.print(fn); Serial.println("()"); }
 Used for Debugging function entries without parameters. More...
 
#define DEBUG_FUNC1(fn, p1)   if (_debugEnabled) { Serial.print(fn); Serial.print('('); Serial.print(p1); Serial.println(')'); }
 Used for Debugging function entries with 1 parameter. More...
 
#define DEBUG_FUNC1X(fn, p1)   if (_debugEnabled) { Serial.print(fn); Serial.print("(0x"); Serial.print(p1, HEX); Serial.println(')'); }
 Used for Debugging function entries with 1 parameters as hex Value. More...
 
#define DEBUG_FUNC2(fn, p1, p2)   if (_debugEnabled) { Serial.print(fn); Serial.print('('); Serial.print(p1); Serial.print(", "); Serial.print(p2); Serial.println(')'); }
 Used for Debugging function entries with 2 parameters. More...
 
#define DEBUG_FUNC2X(fn, p1, p2)   if (_debugEnabled) { Serial.print(fn); Serial.print("(0x"); Serial.print(p1, HEX); Serial.print(", 0x"); Serial.print(p2, HEX); Serial.println(')'); }
 Used for Debugging function entries with 2 parameters and Hex Value. More...
 

Typedefs

typedef void(* receiveRDSFunction )(uint16_t block1, uint16_t block2, uint16_t block3, uint16_t block4)
 callback function for passing RDS data. More...
 
typedef uint16_t RADIO_FREQ
 

Enumerations

enum  RADIO_BAND {
  RADIO_BAND_NONE = 0, RADIO_BAND_FM = 1, RADIO_BAND_FMWORLD = 2, RADIO_BAND_AM = 3,
  RADIO_BAND_KW = 4, RADIO_BAND_MAX = 4
}
 

Detailed Description

Library header file for the radio libraries to control radio chips.

Author
Matthias Hertel, http://www.mathertel.de

This library enables the use of diverse radio chips by sharing the same class definition. Implementation for the following Radio Chips are available:

The following chip is planned to be supported too: ...

More documentation and source code is available at http://www.mathertel.de/Arduino

ChangeLog:

TODO:

Macro Definition Documentation

#define DEBUG_FUNC0 (   fn)    if (_debugEnabled) { Serial.print(fn); Serial.println("()"); }

Used for Debugging function entries without parameters.

#define DEBUG_FUNC1 (   fn,
  p1 
)    if (_debugEnabled) { Serial.print(fn); Serial.print('('); Serial.print(p1); Serial.println(')'); }

Used for Debugging function entries with 1 parameter.

#define DEBUG_FUNC1X (   fn,
  p1 
)    if (_debugEnabled) { Serial.print(fn); Serial.print("(0x"); Serial.print(p1, HEX); Serial.println(')'); }

Used for Debugging function entries with 1 parameters as hex Value.

#define DEBUG_FUNC2 (   fn,
  p1,
  p2 
)    if (_debugEnabled) { Serial.print(fn); Serial.print('('); Serial.print(p1); Serial.print(", "); Serial.print(p2); Serial.println(')'); }

Used for Debugging function entries with 2 parameters.

#define DEBUG_FUNC2X (   fn,
  p1,
  p2 
)    if (_debugEnabled) { Serial.print(fn); Serial.print("(0x"); Serial.print(p1, HEX); Serial.print(", 0x"); Serial.print(p2, HEX); Serial.println(')'); }

Used for Debugging function entries with 2 parameters and Hex Value.

#define DEBUG_STR (   txt)    if (_debugEnabled) { Serial.println(txt); }

Used for Debugging text information.

#define DEBUG_VAL (   label,
  val 
)    if (_debugEnabled) { Serial.print(label); Serial.print(':'); Serial.println(val); }

Used for Debugging function entries without parameters.

#define DEBUG_VALX (   label,
  val 
)    if (_debugEnabled) { Serial.print(label); Serial.print(':'); Serial.println(val, HEX); }

Typedef Documentation

typedef uint16_t RADIO_FREQ

Frequency data type. Only 16 bits are used for any frequency value (not the real one)

typedef void(* receiveRDSFunction)(uint16_t block1, uint16_t block2, uint16_t block3, uint16_t block4)

callback function for passing RDS data.

Enumeration Type Documentation

enum RADIO_BAND

Band datatype. The BANDs a receiver probably can implement.

Enumerator
RADIO_BAND_NONE 

No band selected.

RADIO_BAND_FM 

FM band 87.5 – 108 MHz (USA, Europe) selected.

RADIO_BAND_FMWORLD 

FM band 76 – 108 MHz (Japan, Worldwide) selected.

RADIO_BAND_AM 

AM band selected.

RADIO_BAND_KW 

KW band selected.

RADIO_BAND_MAX 

Maximal band enumeration value.