Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <exec/types.h>
- #include <exec/memory.h>
- #include <proto/exec.h>
- #include <proto/dos.h>
- #include <proto/intuition.h>
- #include <proto/expansion.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- struct Library *ExpansionBase = NULL;
- int main (int argc, char ** argv)
- {
- struct ConfigDev *configDev;
- if((ExpansionBase=OpenLibrary("expansion.library",0L))==NULL)
- {
- printf("FATAL: Unable to open expansion.library\n");
- exit(RETURN_FAIL);
- }
- // Now we can use expansion.library
- configDev = NULL;
- configDev = AllocConfigDev();
- if (configDev == NULL)
- {
- printf("FATAL: unable to allocate the config dev structure\n");
- exit(RETURN_FAIL);
- }
- // read the expansion ROM
- ReadExpansionRom(EZ3_EXPANSIONBASE, configDev );
- for (int i = 0; i < 10; i++)
- {
- printf("tick %d\n", i);
- }
- printf("INFO: Board Found. Configuring\n");
- configDev->cd_BoardAddr = (void *) EZ3_EXPANSIONBASE;
- ConfigBoard(EZ3_EXPANSIONBASE, configDev );
- CloseLibrary(ExpansionBase);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement