disable debug
[AROS.git] / workbench / tools / SysExplorer / Modules / ATA / ata_init.c
blob9d0d2a32a039cb25b1ad7839d4717cb7b2844035
1 /*
2 Copyright (C) 2018-2019, The AROS Development Team.
3 $Id$
4 */
6 #include <aros/debug.h>
8 #include <proto/sysexp.h>
9 #include <proto/oop.h>
11 #include <aros/libcall.h>
12 #include <aros/asmcall.h>
13 #include <aros/symbolsets.h>
15 #include "ata_intern.h"
17 extern void ATAStartup(struct SysexpBase *);
18 extern void ATAShutdown(struct SysexpBase *);
20 #if (1) // TODO : Move into libbase
21 OOP_AttrBase HiddStorageUnitAB;
22 OOP_AttrBase HiddATABusAB;
23 OOP_AttrBase HiddATAUnitAB;
25 OOP_MethodID HiddStorageControllerBase;
26 #endif
28 const struct OOP_ABDescr ata_abd[] =
30 {IID_Hidd_StorageUnit , &HiddStorageUnitAB },
31 {IID_Hidd_ATABus , &HiddATABusAB },
32 {IID_Hidd_ATAUnit, &HiddATAUnitAB},
33 {NULL , NULL }
36 static int ataenum_init(struct SysexpATABase *AtaBase)
38 D(bug("[ata.sysexp] %s()\n", __func__));
40 OOP_ObtainAttrBases(ata_abd);
42 HiddStorageControllerBase = OOP_GetMethodID(IID_Hidd_StorageController, 0);
44 return 2;
47 ADD2INITLIB(ataenum_init, 10);
49 AROS_LH1(void, ModuleInit,
50 AROS_LHA(void *, SysexpBase, A0),
51 struct SysexpATABase *, AtaBase, 5, Ata
54 AROS_LIBFUNC_INIT
56 D(bug("[ata.sysexp] %s(%p)\n", __func__, SysexpBase));
58 AtaBase->seab_SysexpBase = SysexpBase;
59 AtaBase->seab_Module.sem_Node.ln_Name = "ATA.Module";
60 AtaBase->seab_Module.sem_Node.ln_Pri = 90;
61 AtaBase->seab_Module.sem_Startup = ATAStartup;
62 AtaBase->seab_Module.sem_Shutdown = ATAShutdown;
63 RegisterModule(&AtaBase->seab_Module, AtaBase);
65 return;
67 AROS_LIBFUNC_EXIT