progress?
This commit is contained in:
parent
12253edfb7
commit
7c926ad2b4
|
@ -135,9 +135,9 @@ ELUA_EXT_OBJS= $(BUILDDIR)/obj/ch_lua.o.ext $(BUILDDIR)/obj/elua_chibios_mod.o.e
|
||||||
|
|
||||||
|
|
||||||
EXT_INC = $(CHIBIOSLUA)/ext \
|
EXT_INC = $(CHIBIOSLUA)/ext \
|
||||||
|
$(CHIBIOSLUA)/ext/platform_chibios \
|
||||||
$(ELUA)/inc \
|
$(ELUA)/inc \
|
||||||
$(ELUA)/inc/newlib \
|
$(ELUA)/inc/newlib \
|
||||||
$(CHIBIOSLUA)/ext/platform_chibios \
|
|
||||||
$(ELUA)/src/lua \
|
$(ELUA)/src/lua \
|
||||||
$(ELUA)/src/modules \
|
$(ELUA)/src/modules \
|
||||||
$(ELUA)/boards/headers \
|
$(ELUA)/boards/headers \
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
// i386 (Intel) CPU configuration
|
// i386 (Intel) CPU configuration
|
||||||
|
|
||||||
|
#include "ch.h"
|
||||||
|
#include "hal.h"
|
||||||
|
|
||||||
#ifndef __CPU_I386_H__
|
#ifndef __CPU_I386_H__
|
||||||
#define __CPU_I386_H__
|
#define __CPU_I386_H__
|
||||||
|
|
||||||
|
@ -13,6 +16,7 @@
|
||||||
#define NUM_PWM 0
|
#define NUM_PWM 0
|
||||||
#define NUM_ADC 0
|
#define NUM_ADC 0
|
||||||
#define NUM_CAN 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)
|
// CPU frequency (needed by the CPU module and MMCFS code, 0 if not used)
|
||||||
#define CPU_FREQUENCY 0
|
#define CPU_FREQUENCY 0
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
#define ELUA_STR_VERSION "unknown"
|
|
@ -1,5 +1,7 @@
|
||||||
// Platform-dependent functions
|
// Platform-dependent functions
|
||||||
|
|
||||||
|
#include "ch.h"
|
||||||
|
#include "hal.h"
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "type.h"
|
#include "type.h"
|
||||||
#include "devman.h"
|
#include "devman.h"
|
||||||
|
@ -16,7 +18,7 @@
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "platform_conf.h"
|
#include "platform_conf.h"
|
||||||
#include "hal.h"
|
#include "platform_generic.h"
|
||||||
|
|
||||||
// ****************************************************************************
|
// ****************************************************************************
|
||||||
// Platform initialization
|
// Platform initialization
|
||||||
|
@ -52,12 +54,12 @@ pio_type platform_pio_op( unsigned port, pio_type pinmask, int op )
|
||||||
|
|
||||||
case PLATFORM_IO_PORT_DIR_OUTPUT:
|
case PLATFORM_IO_PORT_DIR_OUTPUT:
|
||||||
new_state &= ~(ignore_pins[port]);//exclude some pins
|
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;
|
break;
|
||||||
|
|
||||||
case PLATFORM_IO_PORT_DIR_INPUT:
|
case PLATFORM_IO_PORT_DIR_INPUT:
|
||||||
new_state &= ~(ignore_pins[port]);//exclude some pins
|
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;
|
break;
|
||||||
|
|
||||||
case PLATFORM_IO_PORT_GET_VALUE:
|
case PLATFORM_IO_PORT_GET_VALUE:
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
#ifndef __PLATFORM_CONF_H__
|
#ifndef __PLATFORM_CONF_H__
|
||||||
#define __PLATFORM_CONF_H__
|
#define __PLATFORM_CONF_H__
|
||||||
|
|
||||||
|
#include "cpu_chibios_cpu.h"
|
||||||
|
#include "board_stm32f4chibios.h"
|
||||||
|
|
||||||
#include "auxmods.h"
|
#include "auxmods.h"
|
||||||
#include "type.h"
|
#include "type.h"
|
||||||
#include "stacks.h"
|
#include "stacks.h"
|
||||||
|
@ -10,7 +13,7 @@
|
||||||
#define BUILD_CON_GENERIC
|
#define BUILD_CON_GENERIC
|
||||||
#define BUILD_SHELL
|
#define BUILD_SHELL
|
||||||
#define BUILD_TERM
|
#define BUILD_TERM
|
||||||
#define BUILD_ROMFS
|
#undef BUILD_ROMFS
|
||||||
#define BUILD_XMODEM
|
#define BUILD_XMODEM
|
||||||
#define BUILD_LINENOISE
|
#define BUILD_LINENOISE
|
||||||
|
|
||||||
|
@ -80,8 +83,7 @@
|
||||||
{LUA_OSLIBNAME, luaopen_os},\
|
{LUA_OSLIBNAME, luaopen_os},\
|
||||||
{LUA_STRLIBNAME, luaopen_string },\
|
{LUA_STRLIBNAME, luaopen_string },\
|
||||||
{LUA_MATHLIBNAME, luaopen_math },\
|
{LUA_MATHLIBNAME, luaopen_math },\
|
||||||
{LUA_DBLIBNAME, luaopen_debug }, \
|
{LUA_DBLIBNAME, luaopen_debug }
|
||||||
{AUXLIB_CHIBIOS, luaopen_chibios, ch_thread_map}
|
|
||||||
|
|
||||||
#define LUA_PLATFORM_LIBS_ROM\
|
#define LUA_PLATFORM_LIBS_ROM\
|
||||||
_ROM( AUXLIB_PIO, luaopen_pio, pio_map )\
|
_ROM( AUXLIB_PIO, luaopen_pio, pio_map )\
|
|
@ -4,6 +4,7 @@
|
||||||
#define __PLATFORM_GENERIC_H__
|
#define __PLATFORM_GENERIC_H__
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
|
#include "hal.h"
|
||||||
|
|
||||||
//~ #define PLATFORM_TMR_COUNTS_DOWN
|
//~ #define PLATFORM_TMR_COUNTS_DOWN
|
||||||
extern BaseSequentialStream *eLuaSDriver;
|
extern BaseSequentialStream *eLuaSDriver;
|
||||||
|
|
Loading…
Reference in New Issue