progress?

This commit is contained in:
rusefillc 2021-04-22 01:16:50 -04:00
parent 12253edfb7
commit 7c926ad2b4
8 changed files with 25 additions and 7 deletions

View File

@ -135,9 +135,9 @@ ELUA_EXT_OBJS= $(BUILDDIR)/obj/ch_lua.o.ext $(BUILDDIR)/obj/elua_chibios_mod.o.e
EXT_INC = $(CHIBIOSLUA)/ext \
$(CHIBIOSLUA)/ext/platform_chibios \
$(ELUA)/inc \
$(ELUA)/inc/newlib \
$(CHIBIOSLUA)/ext/platform_chibios \
$(ELUA)/src/lua \
$(ELUA)/src/modules \
$(ELUA)/boards/headers \

View File

@ -1,5 +1,8 @@
// i386 (Intel) CPU configuration
#include "ch.h"
#include "hal.h"
#ifndef __CPU_I386_H__
#define __CPU_I386_H__
@ -13,6 +16,7 @@
#define NUM_PWM 0
#define NUM_ADC 0
#define NUM_CAN 0
#define SERMUX_SERVICE_ID_FIRST 0
// CPU frequency (needed by the CPU module and MMCFS code, 0 if not used)
#define CPU_FREQUENCY 0

View File

@ -0,0 +1,2 @@
#define ELUA_STR_VERSION "unknown"

View File

@ -1,5 +1,7 @@
// Platform-dependent functions
#include "ch.h"
#include "hal.h"
#include "platform.h"
#include "type.h"
#include "devman.h"
@ -16,7 +18,7 @@
#include "utils.h"
#include "common.h"
#include "platform_conf.h"
#include "hal.h"
#include "platform_generic.h"
// ****************************************************************************
// Platform initialization
@ -52,12 +54,12 @@ pio_type platform_pio_op( unsigned port, pio_type pinmask, int op )
case PLATFORM_IO_PORT_DIR_OUTPUT:
new_state &= ~(ignore_pins[port]);//exclude some pins
palSetGroupMode(target_port,new_state, 0, PAL_STM32_MODE_OUTPUT | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_MID1 | PAL_STM32_PUDR_FLOATING );
palSetGroupMode(target_port,new_state, 0, PAL_STM32_MODE_OUTPUT | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_MID1 | PAL_STM32_PUPDR_FLOATING );
break;
case PLATFORM_IO_PORT_DIR_INPUT:
new_state &= ~(ignore_pins[port]);//exclude some pins
palSetGroupMode(target_port,new_state, 0, PAL_STM32_MODE_INPUT | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_MID1 | PAL_STM32_PUDR_FLOATING );
palSetGroupMode(target_port,new_state, 0, PAL_STM32_MODE_INPUT | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_MID1 | PAL_STM32_PUPDR_FLOATING );
break;
case PLATFORM_IO_PORT_GET_VALUE:

View File

@ -3,6 +3,9 @@
#ifndef __PLATFORM_CONF_H__
#define __PLATFORM_CONF_H__
#include "cpu_chibios_cpu.h"
#include "board_stm32f4chibios.h"
#include "auxmods.h"
#include "type.h"
#include "stacks.h"
@ -10,7 +13,7 @@
#define BUILD_CON_GENERIC
#define BUILD_SHELL
#define BUILD_TERM
#define BUILD_ROMFS
#undef BUILD_ROMFS
#define BUILD_XMODEM
#define BUILD_LINENOISE
@ -80,8 +83,7 @@
{LUA_OSLIBNAME, luaopen_os},\
{LUA_STRLIBNAME, luaopen_string },\
{LUA_MATHLIBNAME, luaopen_math },\
{LUA_DBLIBNAME, luaopen_debug }, \
{AUXLIB_CHIBIOS, luaopen_chibios, ch_thread_map}
{LUA_DBLIBNAME, luaopen_debug }
#define LUA_PLATFORM_LIBS_ROM\
_ROM( AUXLIB_PIO, luaopen_pio, pio_map )\

View File

@ -4,6 +4,7 @@
#define __PLATFORM_GENERIC_H__
#include "ch.h"
#include "hal.h"
//~ #define PLATFORM_TMR_COUNTS_DOWN
extern BaseSequentialStream *eLuaSDriver;

View File

@ -526,6 +526,13 @@
#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
/**
* elua
*/
//~ #define CHIBILUA_SERIAL 1
#define CHIBILUA_USBSERIAL 1
#endif /* HALCONF_H */
/** @} */