diff --git a/.gitignore b/.gitignore index caf43a3..252ad2f 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ packages/vsky/libdsp/lib packages/vsky/libdsp/Settings.h packages/vsky/libdsp/Uart.h packages/vsky/libdsp/SerialSystem.h +packages/vsky/libdsp/Interrupt.h diff --git a/packages/vsky/libdsp/Interrupt.h b/packages/vsky/libdsp/Interrupt.h deleted file mode 100644 index d8f514b..0000000 --- a/packages/vsky/libdsp/Interrupt.h +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Do not modify this file; it is automatically - * generated and any modifications will be overwritten. - * - * @(#) xdc-y44 - */ - -/* - * ======== GENERATED SECTIONS ======== - * - * PROLOGUE - * INCLUDES - * - * INTERNAL DEFINITIONS - * MODULE-WIDE CONFIGS - * FUNCTION DECLARATIONS - * SYSTEM FUNCTIONS - * - * EPILOGUE - * STATE STRUCTURES - * PREFIX ALIASES - */ - - -/* - * ======== PROLOGUE ======== - */ - -#ifndef vsky_libdsp_Interrupt__include -#define vsky_libdsp_Interrupt__include - -#ifndef __nested__ -#define __nested__ -#define vsky_libdsp_Interrupt__top__ -#endif - -#ifdef __cplusplus -#define __extern extern "C" -#else -#define __extern extern -#endif - -#define vsky_libdsp_Interrupt___VERS 150 - - -/* - * ======== INCLUDES ======== - */ - -#include - -#include -#include -#include - -#include - - -/* - * ======== AUXILIARY DEFINITIONS ======== - */ - -/* IRQDescr */ -struct vsky_libdsp_Interrupt_IRQDescr { - xdc_Int8 vector; - xdc_Int8 combine; - xdc_Int8 event; - xdc_Int8 cic; - xdc_Int16 host; - xdc_Int16 system; -}; - - -/* - * ======== INTERNAL DEFINITIONS ======== - */ - -/* Module_State */ -typedef vsky_libdsp_Interrupt_IRQDescr __T1_vsky_libdsp_Interrupt_Module_State__descriptors; -typedef vsky_libdsp_Interrupt_IRQDescr *__ARRAY1_vsky_libdsp_Interrupt_Module_State__descriptors; -typedef __ARRAY1_vsky_libdsp_Interrupt_Module_State__descriptors __TA_vsky_libdsp_Interrupt_Module_State__descriptors; - - -/* - * ======== MODULE-WIDE CONFIGS ======== - */ - -/* Module__diagsEnabled */ -typedef xdc_Bits32 CT__vsky_libdsp_Interrupt_Module__diagsEnabled; -__extern __FAR__ const CT__vsky_libdsp_Interrupt_Module__diagsEnabled vsky_libdsp_Interrupt_Module__diagsEnabled__C; - -/* Module__diagsIncluded */ -typedef xdc_Bits32 CT__vsky_libdsp_Interrupt_Module__diagsIncluded; -__extern __FAR__ const CT__vsky_libdsp_Interrupt_Module__diagsIncluded vsky_libdsp_Interrupt_Module__diagsIncluded__C; - -/* Module__diagsMask */ -typedef xdc_Bits16* CT__vsky_libdsp_Interrupt_Module__diagsMask; -__extern __FAR__ const CT__vsky_libdsp_Interrupt_Module__diagsMask vsky_libdsp_Interrupt_Module__diagsMask__C; - -/* Module__gateObj */ -typedef xdc_Ptr CT__vsky_libdsp_Interrupt_Module__gateObj; -__extern __FAR__ const CT__vsky_libdsp_Interrupt_Module__gateObj vsky_libdsp_Interrupt_Module__gateObj__C; - -/* Module__gatePrms */ -typedef xdc_Ptr CT__vsky_libdsp_Interrupt_Module__gatePrms; -__extern __FAR__ const CT__vsky_libdsp_Interrupt_Module__gatePrms vsky_libdsp_Interrupt_Module__gatePrms__C; - -/* Module__id */ -typedef xdc_runtime_Types_ModuleId CT__vsky_libdsp_Interrupt_Module__id; -__extern __FAR__ const CT__vsky_libdsp_Interrupt_Module__id vsky_libdsp_Interrupt_Module__id__C; - -/* Module__loggerDefined */ -typedef xdc_Bool CT__vsky_libdsp_Interrupt_Module__loggerDefined; -__extern __FAR__ const CT__vsky_libdsp_Interrupt_Module__loggerDefined vsky_libdsp_Interrupt_Module__loggerDefined__C; - -/* Module__loggerObj */ -typedef xdc_Ptr CT__vsky_libdsp_Interrupt_Module__loggerObj; -__extern __FAR__ const CT__vsky_libdsp_Interrupt_Module__loggerObj vsky_libdsp_Interrupt_Module__loggerObj__C; - -/* Module__loggerFxn0 */ -typedef xdc_runtime_Types_LoggerFxn0 CT__vsky_libdsp_Interrupt_Module__loggerFxn0; -__extern __FAR__ const CT__vsky_libdsp_Interrupt_Module__loggerFxn0 vsky_libdsp_Interrupt_Module__loggerFxn0__C; - -/* Module__loggerFxn1 */ -typedef xdc_runtime_Types_LoggerFxn1 CT__vsky_libdsp_Interrupt_Module__loggerFxn1; -__extern __FAR__ const CT__vsky_libdsp_Interrupt_Module__loggerFxn1 vsky_libdsp_Interrupt_Module__loggerFxn1__C; - -/* Module__loggerFxn2 */ -typedef xdc_runtime_Types_LoggerFxn2 CT__vsky_libdsp_Interrupt_Module__loggerFxn2; -__extern __FAR__ const CT__vsky_libdsp_Interrupt_Module__loggerFxn2 vsky_libdsp_Interrupt_Module__loggerFxn2__C; - -/* Module__loggerFxn4 */ -typedef xdc_runtime_Types_LoggerFxn4 CT__vsky_libdsp_Interrupt_Module__loggerFxn4; -__extern __FAR__ const CT__vsky_libdsp_Interrupt_Module__loggerFxn4 vsky_libdsp_Interrupt_Module__loggerFxn4__C; - -/* Module__loggerFxn8 */ -typedef xdc_runtime_Types_LoggerFxn8 CT__vsky_libdsp_Interrupt_Module__loggerFxn8; -__extern __FAR__ const CT__vsky_libdsp_Interrupt_Module__loggerFxn8 vsky_libdsp_Interrupt_Module__loggerFxn8__C; - -/* Module__startupDoneFxn */ -typedef xdc_Bool (*CT__vsky_libdsp_Interrupt_Module__startupDoneFxn)(void); -__extern __FAR__ const CT__vsky_libdsp_Interrupt_Module__startupDoneFxn vsky_libdsp_Interrupt_Module__startupDoneFxn__C; - -/* Object__count */ -typedef xdc_Int CT__vsky_libdsp_Interrupt_Object__count; -__extern __FAR__ const CT__vsky_libdsp_Interrupt_Object__count vsky_libdsp_Interrupt_Object__count__C; - -/* Object__heap */ -typedef xdc_runtime_IHeap_Handle CT__vsky_libdsp_Interrupt_Object__heap; -__extern __FAR__ const CT__vsky_libdsp_Interrupt_Object__heap vsky_libdsp_Interrupt_Object__heap__C; - -/* Object__sizeof */ -typedef xdc_SizeT CT__vsky_libdsp_Interrupt_Object__sizeof; -__extern __FAR__ const CT__vsky_libdsp_Interrupt_Object__sizeof vsky_libdsp_Interrupt_Object__sizeof__C; - -/* Object__table */ -typedef xdc_Ptr CT__vsky_libdsp_Interrupt_Object__table; -__extern __FAR__ const CT__vsky_libdsp_Interrupt_Object__table vsky_libdsp_Interrupt_Object__table__C; - - -/* - * ======== FUNCTION DECLARATIONS ======== - */ - -/* Module_startup */ -#define vsky_libdsp_Interrupt_Module_startup( state ) (-1) - -/* Module__startupDone__S */ -xdc__CODESECT(vsky_libdsp_Interrupt_Module__startupDone__S, "vsky_libdsp_Interrupt_Module__startupDone") -__extern xdc_Bool vsky_libdsp_Interrupt_Module__startupDone__S( void ); - - -/* - * ======== SYSTEM FUNCTIONS ======== - */ - -/* Module_startupDone */ -#define vsky_libdsp_Interrupt_Module_startupDone() vsky_libdsp_Interrupt_Module__startupDone__S() - -/* Object_heap */ -#define vsky_libdsp_Interrupt_Object_heap() vsky_libdsp_Interrupt_Object__heap__C - -/* Module_heap */ -#define vsky_libdsp_Interrupt_Module_heap() vsky_libdsp_Interrupt_Object__heap__C - -/* Module_id */ -static inline CT__vsky_libdsp_Interrupt_Module__id vsky_libdsp_Interrupt_Module_id( void ) -{ - return vsky_libdsp_Interrupt_Module__id__C; -} - -/* Module_hasMask */ -static inline xdc_Bool vsky_libdsp_Interrupt_Module_hasMask( void ) -{ - return vsky_libdsp_Interrupt_Module__diagsMask__C != NULL; -} - -/* Module_getMask */ -static inline xdc_Bits16 vsky_libdsp_Interrupt_Module_getMask( void ) -{ - return vsky_libdsp_Interrupt_Module__diagsMask__C != NULL ? *vsky_libdsp_Interrupt_Module__diagsMask__C : 0; -} - -/* Module_setMask */ -static inline xdc_Void vsky_libdsp_Interrupt_Module_setMask( xdc_Bits16 mask ) -{ - if (vsky_libdsp_Interrupt_Module__diagsMask__C != NULL) *vsky_libdsp_Interrupt_Module__diagsMask__C = mask; -} - - -/* - * ======== EPILOGUE ======== - */ - -#ifdef vsky_libdsp_Interrupt__top__ -#undef __nested__ -#endif - -#endif /* vsky_libdsp_Interrupt__include */ - - -/* - * ======== STATE STRUCTURES ======== - */ - -#if defined(__config__) || (!defined(__nested__) && defined(vsky_libdsp_Interrupt__internalaccess)) - -#ifndef vsky_libdsp_Interrupt__include_state -#define vsky_libdsp_Interrupt__include_state - -/* Module_State */ -struct vsky_libdsp_Interrupt_Module_State { - xdc_UInt32 max; - __TA_vsky_libdsp_Interrupt_Module_State__descriptors descriptors; -}; - -/* Module__state__V */ -extern struct vsky_libdsp_Interrupt_Module_State__ vsky_libdsp_Interrupt_Module__state__V; - -#endif /* vsky_libdsp_Interrupt__include_state */ - -#endif - - -/* - * ======== PREFIX ALIASES ======== - */ - -#if !defined(__nested__) && !defined(vsky_libdsp_Interrupt__nolocalnames) - -#ifndef vsky_libdsp_Interrupt__localnames__done -#define vsky_libdsp_Interrupt__localnames__done - -/* module prefix */ -#define Interrupt_IRQDescr vsky_libdsp_Interrupt_IRQDescr -#define Interrupt_Module_State vsky_libdsp_Interrupt_Module_State -#define Interrupt_Module_name vsky_libdsp_Interrupt_Module_name -#define Interrupt_Module_id vsky_libdsp_Interrupt_Module_id -#define Interrupt_Module_startup vsky_libdsp_Interrupt_Module_startup -#define Interrupt_Module_startupDone vsky_libdsp_Interrupt_Module_startupDone -#define Interrupt_Module_hasMask vsky_libdsp_Interrupt_Module_hasMask -#define Interrupt_Module_getMask vsky_libdsp_Interrupt_Module_getMask -#define Interrupt_Module_setMask vsky_libdsp_Interrupt_Module_setMask -#define Interrupt_Object_heap vsky_libdsp_Interrupt_Object_heap -#define Interrupt_Module_heap vsky_libdsp_Interrupt_Module_heap - -/* empty prefix (@GlobalNames) */ -#define IRQDescr vsky_libdsp_Interrupt_IRQDescr -#define Module_State vsky_libdsp_Interrupt_Module_State - -#endif /* vsky_libdsp_Interrupt__localnames__done */ -#endif diff --git a/packages/vsky/libdsp/Interrupt.xdc b/packages/vsky/libdsp/Interrupt.xdc index 0fd2f92..763956e 100644 --- a/packages/vsky/libdsp/Interrupt.xdc +++ b/packages/vsky/libdsp/Interrupt.xdc @@ -9,6 +9,8 @@ module Interrupt { Int16 system; }; + config UInt32 max = 10; + internal: struct Module_State { UInt32 max; diff --git a/packages/vsky/libdsp/Interrupt.xs b/packages/vsky/libdsp/Interrupt.xs index 92c2443..14614d3 100644 --- a/packages/vsky/libdsp/Interrupt.xs +++ b/packages/vsky/libdsp/Interrupt.xs @@ -12,7 +12,7 @@ function module$static$init(obj) // } } -function module$use +function module$use() { //desc = xdc.loadXML("vsky/libdsp/descriptor.xml"); //print(desc); diff --git a/packages/vsky/libdsp/package.xdc b/packages/vsky/libdsp/package.xdc index a4f59c9..4a39246 100644 --- a/packages/vsky/libdsp/package.xdc +++ b/packages/vsky/libdsp/package.xdc @@ -3,7 +3,6 @@ */ package vsky.libdsp { module Settings; - module Interrupt; module Uart; module SerialSystem; }