dodany helper_impl do kompilacji i budowania
This commit is contained in:
BIN
ZDistA_komp.dll
BIN
ZDistA_komp.dll
Binary file not shown.
BIN
ZDistA_komp.exp
BIN
ZDistA_komp.exp
Binary file not shown.
@@ -28,10 +28,19 @@ if errorlevel 1 (
|
|||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
REM Kompilacja wrappera
|
||||||
|
clang %CFLAGS% %INCLUDES% ^
|
||||||
|
-c helper_impl.c -o helper_impl.o 2>&1
|
||||||
|
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo Blad kompilacji helper_impl.c
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
REM Linkowanie do DLL z eksportami
|
REM Linkowanie do DLL z eksportami
|
||||||
clang -target x86_64-pc-windows-msvc -shared ^
|
clang -target x86_64-pc-windows-msvc -shared ^
|
||||||
-o ZDistA_komp.dll ^
|
-o ZDistA_komp.dll ^
|
||||||
ZDistA_komp.o ZDistA_wrapper.o ^
|
ZDistA_komp.o ZDistA_wrapper.o helper_impl.o ^
|
||||||
-lkernel32 2>&1
|
-lkernel32 2>&1
|
||||||
|
|
||||||
if errorlevel 1 (
|
if errorlevel 1 (
|
||||||
|
|||||||
@@ -41,3 +41,36 @@ int set_bit_ptr_struct(u32 io, struct binary_io *b) {
|
|||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int set_float_ptr(u32 io,void *float_ptr)
|
||||||
|
{
|
||||||
|
float *fptr;
|
||||||
|
|
||||||
|
// fptr = (float *)(log_manager.nets_data + (io >> 3));
|
||||||
|
// if((u8 *)fptr > (log_manager.nets_data + sizeof(log_manager.nets_data) - sizeof(float)))
|
||||||
|
// return -1;
|
||||||
|
|
||||||
|
*(u32 *)float_ptr=(u32)fptr;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int set_pointer_in_ptr(u32 io, u32 *pointer_ptr)
|
||||||
|
{
|
||||||
|
u32 *f_ptr;
|
||||||
|
|
||||||
|
f_ptr = (u32 *)(log_manager.nets_data + (io >> 3));
|
||||||
|
if((u8 *)f_ptr > (log_manager.nets_data+sizeof(log_manager.nets_data) - sizeof(void *)))
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if((u32)f_ptr == (u32)&log_manager.nets_data[0]) // if pointer connected to net '0'
|
||||||
|
*(u32 *)pointer_ptr=(u32)f_ptr;
|
||||||
|
else
|
||||||
|
*(u32 *)pointer_ptr=(u32)*f_ptr;
|
||||||
|
|
||||||
|
if(!*f_ptr)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ extern struct klapacz_config klap_cfg;
|
|||||||
#define MDSTAT4 *((volatile int*)0x01C10810)
|
#define MDSTAT4 *((volatile int*)0x01C10810)
|
||||||
#define MDSTAT10 *((volatile int*)0x01E27828)
|
#define MDSTAT10 *((volatile int*)0x01E27828)
|
||||||
|
|
||||||
extern Semaphore_Handle spi_semaphore;
|
//extern Semaphore_Handle spi_semaphore;
|
||||||
|
|
||||||
extern volatile int was_irq;
|
extern volatile int was_irq;
|
||||||
extern u16 bus_an_cur_timestamp;
|
extern u16 bus_an_cur_timestamp;
|
||||||
@@ -334,7 +334,7 @@ extern u16 bus_out_data_test[MAX_OUT_CARDS];
|
|||||||
extern u8 bus_bin_data_ench[MAX_BIN_CARDS];
|
extern u8 bus_bin_data_ench[MAX_BIN_CARDS];
|
||||||
extern u8 force_bus_bin_data_ench[MAX_BIN_CARDS];
|
extern u8 force_bus_bin_data_ench[MAX_BIN_CARDS];
|
||||||
|
|
||||||
extern Swi_Handle swi_notify;
|
//extern Swi_Handle swi_notify;
|
||||||
|
|
||||||
#define PWM1_SET(x,y) *((volatile uint16_t*)x) = y
|
#define PWM1_SET(x,y) *((volatile uint16_t*)x) = y
|
||||||
#define PWM1_GET(x) *((volatile uint16_t*)x)
|
#define PWM1_GET(x) *((volatile uint16_t*)x)
|
||||||
|
|||||||
Reference in New Issue
Block a user