played around with different inputs to change the temperature display
[goodfet] / client / GoodFETtwe.py
1 #!/usr/bin/env python
2 # GoodFET Atmel 2-wire EEPROM client library
3
4
5 import sys, time, string, cStringIO, struct, glob, serial, os;
6
7 from GoodFET import GoodFET;
8
9 class GoodFETtwe(GoodFET):
10     
11     JEDECsize=0;
12
13     def setup(self):
14         """Move the FET into the SPI application."""
15         self.writecmd(0x05, 0x10, 0, []) # SETUP
16     
17     def peekblock(self, adr):
18         """Grab a few block from an SPI Flash ROM.  Block size is unknown"""
19         data = [adr&0xFF, (adr&0xFF00)>>8]
20         
21         self.writecmd(0x05, 0x02, 2, data) # PEEK
22         return self.data
23     
24