Adafruit Library
Classes | Macros | Enumerations
Adafruit_seesaw.h File Reference
#include "WProgram.h"
#include <Wire.h>

Go to the source code of this file.

Classes

union  keyEventRaw
 
union  keyEvent
 
union  keyState
 
class  Adafruit_seesaw
 Class that stores state and functions for interacting with seesaw helper IC. More...
 
union  Adafruit_seesaw::sercom_inten
 

Macros

#define SEESAW_ADDRESS   (0x49)
 Default Seesaw I2C address.
 
#define ADC_INPUT_0_PIN   2
 default ADC input pin
 
#define ADC_INPUT_1_PIN   3
 default ADC input pin
 
#define ADC_INPUT_2_PIN   4
 default ADC input pin
 
#define ADC_INPUT_3_PIN   5
 default ADC input pin
 
#define PWM_0_PIN   4
 default PWM output pin
 
#define PWM_1_PIN   5
 default PWM output pin
 
#define PWM_2_PIN   6
 default PWM output pin
 
#define PWM_3_PIN   7
 default PWM output pin
 
#define INPUT_PULLDOWN   0x03
 INPUT_PULLDOWN. More...
 
#define SEESAW_HW_ID_CODE   0x55
 seesaw HW ID code
 
#define SEESAW_EEPROM_I2C_ADDR   0x3F
 support this feature) More...
 

Enumerations

enum  {
  SEESAW_STATUS_BASE = 0x00, SEESAW_GPIO_BASE = 0x01, SEESAW_SERCOM0_BASE = 0x02, SEESAW_TIMER_BASE = 0x08,
  SEESAW_ADC_BASE = 0x09, SEESAW_DAC_BASE = 0x0A, SEESAW_INTERRUPT_BASE = 0x0B, SEESAW_DAP_BASE = 0x0C,
  SEESAW_EEPROM_BASE = 0x0D, SEESAW_NEOPIXEL_BASE = 0x0E, SEESAW_TOUCH_BASE = 0x0F, SEESAW_KEYPAD_BASE = 0x10,
  SEESAW_ENCODER_BASE = 0x11
}
 
enum  {
  SEESAW_GPIO_DIRSET_BULK = 0x02, SEESAW_GPIO_DIRCLR_BULK = 0x03, SEESAW_GPIO_BULK = 0x04, SEESAW_GPIO_BULK_SET = 0x05,
  SEESAW_GPIO_BULK_CLR = 0x06, SEESAW_GPIO_BULK_TOGGLE = 0x07, SEESAW_GPIO_INTENSET = 0x08, SEESAW_GPIO_INTENCLR = 0x09,
  SEESAW_GPIO_INTFLAG = 0x0A, SEESAW_GPIO_PULLENSET = 0x0B, SEESAW_GPIO_PULLENCLR = 0x0C
}
 
enum  {
  SEESAW_STATUS_HW_ID = 0x01, SEESAW_STATUS_VERSION = 0x02, SEESAW_STATUS_OPTIONS = 0x03, SEESAW_STATUS_TEMP = 0x04,
  SEESAW_STATUS_SWRST = 0x7F
}
 
enum  { SEESAW_TIMER_STATUS = 0x00, SEESAW_TIMER_PWM = 0x01, SEESAW_TIMER_FREQ = 0x02 }
 
enum  {
  SEESAW_ADC_STATUS = 0x00, SEESAW_ADC_INTEN = 0x02, SEESAW_ADC_INTENCLR = 0x03, SEESAW_ADC_WINMODE = 0x04,
  SEESAW_ADC_WINTHRESH = 0x05, SEESAW_ADC_CHANNEL_OFFSET = 0x07
}
 
enum  {
  SEESAW_SERCOM_STATUS = 0x00, SEESAW_SERCOM_INTEN = 0x02, SEESAW_SERCOM_INTENCLR = 0x03, SEESAW_SERCOM_BAUD = 0x04,
  SEESAW_SERCOM_DATA = 0x05
}
 
enum  {
  SEESAW_NEOPIXEL_STATUS = 0x00, SEESAW_NEOPIXEL_PIN = 0x01, SEESAW_NEOPIXEL_SPEED = 0x02, SEESAW_NEOPIXEL_BUF_LENGTH = 0x03,
  SEESAW_NEOPIXEL_BUF = 0x04, SEESAW_NEOPIXEL_SHOW = 0x05
}
 
enum  { SEESAW_TOUCH_CHANNEL_OFFSET = 0x10 }
 
enum  {
  SEESAW_KEYPAD_STATUS = 0x00, SEESAW_KEYPAD_EVENT = 0x01, SEESAW_KEYPAD_INTENSET = 0x02, SEESAW_KEYPAD_INTENCLR = 0x03,
  SEESAW_KEYPAD_COUNT = 0x04, SEESAW_KEYPAD_FIFO = 0x10
}
 
enum  { SEESAW_KEYPAD_EDGE_HIGH = 0, SEESAW_KEYPAD_EDGE_LOW, SEESAW_KEYPAD_EDGE_FALLING, SEESAW_KEYPAD_EDGE_RISING }
 
enum  {
  SEESAW_ENCODER_STATUS = 0x00, SEESAW_ENCODER_INTENSET = 0x02, SEESAW_ENCODER_INTENCLR = 0x03, SEESAW_ENCODER_POSITION = 0x04,
  SEESAW_ENCODER_DELTA = 0x05
}
 

Detailed Description

This is part of Adafruit's seesaw driver for the Arduino platform. It is designed specifically to work with the Adafruit products that use seesaw technology.

These chips use I2C to communicate, 2 pins (SCL+SDA) are required to interface with the board.

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

Written by Dean Miller for Adafruit Industries.

BSD license, all text here must be included in any redistribution.

Macro Definition Documentation

◆ INPUT_PULLDOWN

#define INPUT_PULLDOWN   0x03

INPUT_PULLDOWN.

for compatibility with platforms that do not already define

◆ SEESAW_EEPROM_I2C_ADDR

#define SEESAW_EEPROM_I2C_ADDR   0x3F

support this feature)

EEPROM address of i2c address to start up with (for devices that

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Module Base Addreses The module base addresses for different seesaw modules.

◆ anonymous enum

anonymous enum

GPIO module function addres registers

◆ anonymous enum

anonymous enum

status module function addres registers

◆ anonymous enum

anonymous enum

timer module function addres registers

◆ anonymous enum

anonymous enum

ADC module function addres registers

◆ anonymous enum

anonymous enum

Sercom module function addres registers

◆ anonymous enum

anonymous enum

neopixel module function addres registers

◆ anonymous enum

anonymous enum

touch module function addres registers

◆ anonymous enum

anonymous enum

keypad module function addres registers

◆ anonymous enum

anonymous enum

keypad module edge definitions

◆ anonymous enum

anonymous enum

encoder module edge definitions