+int uuencode(char *in,char *out) {
+
+ out[0]=0x20+((in[0]>>2)&0x3f);
+ out[1]=0x20+(((in[0]<<4)|(in[1]>>4))&0x3f);
+ out[2]=0x20+(((in[1]<<2)|(in[2]>>6))&0x3f);
+ out[3]=0x20+(in[2]&0x3f);
+
+ return 0;
+}
+
+int write_to_ram(t_lpc *lpc,char *buf,int addr,int len) {
+
+ int lcount;
+ u8 checksum;
+
+ if(len%4) {
+ printf("ram write: not a multiple of 4\n");
+ return -1;
+ }
+
+ while(1) {
+ if(!(lcount%20)) {
+ /* send checksum */
+ if(lcount!=0) {
+
+ }
+ /* reset checksum */
+ checksum=0;
+ }
+
+ lcount+=1;
+ }
+
+ return 0;
+}
+
+int firmware_to_ram(t_lpc *lpc) {
+
+
+
+ return 0;
+}
+