MCP2210 Library
An Open Source MCP2210 Library for Linux.
mcp2210test.cpp File Reference
#include "mcp2210.h"

Functions

void TestMCP3204 (hid_device *handle)
void Test25LC020A (hid_device *handle)
void TestTC77 (hid_device *handle)
void TestMCP23S08 (hid_device *handle)
void TestGPIO (hid_device *handle)
void TestMisc (hid_device *handle)
int main (int argc, char **argv)

Function Documentation

int main ( int  argc,
char **  argv 
)

initializing the MCP2210 device.

Uncomment each line to test the corresponding device.

release the handle

void Test25LC020A ( hid_device handle)

Test 25LC020A EEPROM Note: the code below assumes that CS is connected to GP0.

void TestGPIO ( hid_device handle)

Test GPIO Generate a rectangular wave on GP0

Set GPIO to be output

Configure GPIO0 direction to output

< Generate a rectangular wave by toggling GP0.

void TestMCP23S08 ( hid_device handle)

Test MCP23S08 (parameters used are for the evaluation board) Note: the code below assumes that CS is connected to GP4

void TestMCP3204 ( hid_device handle)

Test MCP3204 ADC Note: the code below assumes that CS is connected to GP1.

void TestMisc ( hid_device handle)

Running a few tests, you can see the values returned by setting break points and run through the debugger.

void TestTC77 ( hid_device handle)

Test the TC77 temperature sensor Note: the code below assumes that CS is connected to GP7

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines