URL
https://opencores.org/ocsvn/openarty/openarty/trunk
Subversion Repositories openarty
Compare Revisions
- This comparison shows the changes necessary to convert path
/openarty/trunk/sw/board
- from Rev 31 to Rev 32
- ↔ Reverse comparison
Rev 31 → Rev 32
/artyboard.h
134,12 → 134,12
volatile unsigned io_btnsw; |
volatile unsigned io_ledctrl; |
volatile unsigned io_auxsetup, io_gpssetup; |
unsigned io_reserved[32-18]; |
volatile unsigned io_clrled[4]; |
volatile unsigned io_rtcdate; |
volatile unsigned io_gpio; |
volatile unsigned io_uart_rx, io_uart_tx; |
volatile unsigned io_gps_rx, io_gps_tx; |
unsigned io_reserved[32-18]; |
SCOPE io_scope[4]; |
RTC io_rtc; |
SDCARD io_sd; |
/exstartup.c
124,50 → 124,45
; |
|
// Repeating timer, every 250ms |
// zip->tma = (second/4) | 0x80000000; |
zip->tma = 1024 | 0x80000000; |
zip->tma = (second/4) | 0x80000000; |
// zip->tma = 1024 | 0x80000000; |
// Restart the PIC -- listening for SYSINT_TMA only |
zip->pic = SYSINT_TMA; |
zip->pic = EINT(SYSINT_TMA)|SYSINT_TMA; |
zip_rtu(); |
zip->pic = EINT(SYSINT_TMA)|SYSINT_TMA; |
|
sys->io_clrled[0] = green; |
sys->io_ledctrl = 0x010; |
|
zip->pic = SYSINT_TMA; |
zip_rtu(); |
zip->pic = EINT(SYSINT_TMA)|SYSINT_TMA; |
zip_rtu(); |
|
sys->io_clrled[0] = dimgreen; |
sys->io_clrled[1] = green; |
sys->io_scope[0].s_ctrl = 32 | SCOPE_TRIGGER; |
sys->io_scope[0].s_ctrl = 32 | 0x80000000; // SCOPE_TRIGGER; |
sys->io_ledctrl = 0x020; |
|
zip->pic = SYSINT_TMA; |
zip_rtu(); |
zip->pic = EINT(SYSINT_TMA)|SYSINT_TMA; |
zip_rtu(); |
|
sys->io_clrled[1] = dimgreen; |
sys->io_clrled[2] = green; |
sys->io_ledctrl = 0x040; |
|
zip->pic = SYSINT_TMA; |
zip->pic = EINT(SYSINT_TMA); |
zip_rtu(); |
zip->pic = EINT(SYSINT_TMA)|SYSINT_TMA; |
|
sys->io_clrled[2] = dimgreen; |
sys->io_clrled[3] = green; |
sys->io_ledctrl = 0x080; |
|
zip->pic = SYSINT_TMA; |
zip->pic = EINT(SYSINT_TMA); |
zip_rtu(); |
zip->pic = EINT(SYSINT_TMA)|SYSINT_TMA; |
|
sys->io_clrled[3] = dimgreen; |
|
zip->pic = SYSINT_TMA; |
zip->pic = EINT(SYSINT_TMA); |
zip_rtu(); |
zip->pic = EINT(SYSINT_TMA)|SYSINT_TMA; |
|
for(i=0; i<4; i++) |
sys->io_clrled[i] = black; |
174,9 → 169,8
|
// Wait one second ... |
for(i=0; i<4; i++) { |
zip->pic = SYSINT_TMA; |
zip->pic = EINT(SYSINT_TMA); |
zip_rtu(); |
zip->pic = EINT(SYSINT_TMA)|SYSINT_TMA; |
} |
|
sw = sys->io_btnsw & 0x0f; |
186,9 → 180,8
|
// Wait another two second ... |
for(i=0; i<8; i++) { |
zip->pic = SYSINT_TMA; |
zip->pic = EINT(SYSINT_TMA); |
zip_rtu(); |
zip->pic = EINT(SYSINT_TMA)|SYSINT_TMA; |
} |
|
// Blink all the LEDs |
195,15 → 188,13
// First turn them on |
sys->io_ledctrl = 0x0ff; |
// Then wait a quarter second |
zip->pic = SYSINT_TMA; |
zip_rtu(); |
zip->pic = EINT(SYSINT_TMA)|SYSINT_TMA; |
zip_rtu(); |
// Then turn the back off |
sys->io_ledctrl = 0x0f0; |
// and wait another quarter second |
zip->pic = SYSINT_TMA; |
zip_rtu(); |
zip->pic = EINT(SYSINT_TMA)|SYSINT_TMA; |
zip_rtu(); |
|
// Now, read buttons, and flash an LED on any button being held |
// down ... ? neat? |
212,18 → 203,19
while(1) { |
unsigned btn, ledc; |
|
zip->pic = SYSINT_TMA; |
zip->pic = EINT(SYSINT_TMA); |
zip_rtu(); |
zip->pic = EINT(SYSINT_TMA)|SYSINT_TMA; |
// If the button is pressed, toggle the LED |
// Otherwise, turn the LED off. |
// |
// First, get all the pressed buttons |
btn = (sys->io_btnsw >> 4) & 0x0f; |
sys->io_btnsw = 0x0f0; |
// Now, acknowledge the button presses that we just read |
sys->io_btnsw = (btn<<4); |
|
// Of any LEDs that are on, or buttons on, toggle their values |
ledc = (sys->io_ledctrl | btn)&0x0f; |
ledc = (sys->io_ledctrl)&0x0f; |
ledc = (ledc | btn)&0x0f ^ ledc; |
// Make sure we set everything |
ledc |= 0x0f0; |
// Now issue the command |
.
Property changes :
Added: svn:ignore
## -0,0 +1,6 ##
+dump.txt
+exstartup
+exstartup.map
+exstartup.txt
+.gitignore
+.*.swp