User Tools

Site Tools


dseq_bs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dseq_bs [2006/10/25 18:48]
mess code not up to date notice
dseq_bs [2006/12/12 12:10]
mess
Line 1: Line 1:
-bankstick code from bankstick.c 
- 
-this code is outdated, will post the new version soon 
- 
-<​code>​ 
-/////////////////////////////////////////////////////////////////////////////​ 
-// These functions load/save a pattern from bankstick 
-// using 2 page reads/​writes 
-/////////////////////////////////////////////////////////////////////////////​ 
-void BS_SavePat (unsigned char pat_nr){ 
- unsigned char error = 0; 
- unsigned int writeaddr; 
- 
- //each pattern contains 128 bytes 
- //so address = pat_nr*128 
- writeaddr = ((unsigned int)pat_nr) << 7; 
- 
- //write all values to bankstick 
- error = MIOS_BANKSTICK_WritePage(writeaddr,​ buffer); 
- 
- error |= MIOS_BANKSTICK_WritePage(writeaddr + 64, buffer+64); 
- 
-        //need to do some error handling 
-  
-} 
-void BS_LoadPat (unsigned char pat_nr){ 
- unsigned char error = 0; 
- unsigned int readaddr; 
- 
- //each pattern contains 128 bytes 
- //so address = pat_nr*128 
- readaddr = ((unsigned int)pat_nr) << 7; 
- 
- //write all values to bankstick 
- MIOS_BANKSTICK_ReadPage(readaddr,​ buffer); 
- 
- MIOS_BANKSTICK_ReadPage(readaddr+64,​ buffer+64); 
- 
-        //need to do some error handling 
- 
-} 
- 
-</​code>​ 
-\\ 
-back to [[DSEQ32]] 
  
dseq_bs.txt ยท Last modified: 2006/12/12 12:10 by mess