mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
add new board and app for gpio testing on octsimtest board
Change-Id: I01243044002f51b34e8dc12c1b1f565bbf1740a2
This commit is contained in:
3
firmware/apps/gpio_test/Makefile
Normal file
3
firmware/apps/gpio_test/Makefile
Normal file
@@ -0,0 +1,3 @@
|
||||
C_FILES += $(C_LIBUSB_RT)
|
||||
|
||||
C_FILES += gpio_test.c
|
||||
10
firmware/apps/gpio_test/gpio_test.c
Normal file
10
firmware/apps/gpio_test/gpio_test.c
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <stdint.h>
|
||||
#include "utils.h"
|
||||
#include "chip.h"
|
||||
|
||||
|
||||
|
||||
void gpio_test_init(void)
|
||||
{
|
||||
printf("FIXME run tests here\n\n");
|
||||
}
|
||||
54
firmware/apps/gpio_test/main.c
Normal file
54
firmware/apps/gpio_test/main.c
Normal file
@@ -0,0 +1,54 @@
|
||||
|
||||
#include "board.h"
|
||||
#include "utils.h"
|
||||
#include "osmocom/core/timer.h"
|
||||
|
||||
extern void gpio_test_init(void);
|
||||
|
||||
/* returns '1' in case we should break any endless loop */
|
||||
static void check_exec_dbg_cmd(void)
|
||||
{
|
||||
int ch;
|
||||
|
||||
if (!UART_IsRxReady())
|
||||
return;
|
||||
|
||||
ch = UART_GetChar();
|
||||
|
||||
board_exec_dbg_cmd(ch);
|
||||
}
|
||||
|
||||
|
||||
extern int main(void)
|
||||
{
|
||||
led_init();
|
||||
led_blink(LED_RED, BLINK_ALWAYS_ON);
|
||||
led_blink(LED_GREEN, BLINK_ALWAYS_ON);
|
||||
|
||||
/* Enable watchdog for 2000 ms, with no window */
|
||||
WDT_Enable(WDT, WDT_MR_WDRSTEN | WDT_MR_WDDBGHLT | WDT_MR_WDIDLEHLT |
|
||||
(WDT_GetPeriod(2000) << 16) | WDT_GetPeriod(2000));
|
||||
|
||||
PIO_InitializeInterrupts(0);
|
||||
|
||||
|
||||
printf("\n\r\n\r"
|
||||
"=============================================================================\n\r"
|
||||
"GPIO Test firmware " GIT_VERSION " (C) 2019 Sysmocom GmbH\n\r"
|
||||
"=============================================================================\n\r");
|
||||
|
||||
board_main_top();
|
||||
|
||||
TRACE_INFO("starting gpio test...\n\r");
|
||||
gpio_test_init();
|
||||
|
||||
TRACE_INFO("entering main loop...\n\r");
|
||||
while (1) {
|
||||
WDT_Restart(WDT);
|
||||
|
||||
check_exec_dbg_cmd();
|
||||
osmo_timers_prepare();
|
||||
osmo_timers_update();
|
||||
}
|
||||
|
||||
}
|
||||
10
firmware/apps/gpio_test/usb_strings.txt
Normal file
10
firmware/apps/gpio_test/usb_strings.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
sysmocom - s.f.m.c. GmbH
|
||||
SIMtrace 2 compatible device
|
||||
SIMtrace Sniffer
|
||||
SIMtrace CCID
|
||||
SIMtrace Phone
|
||||
SIMtrace MITM
|
||||
CardEmulator Modem 1
|
||||
CardEmulator Modem 2
|
||||
CardEmulator Modem 3
|
||||
CardEmulator Modem 4
|
||||
Reference in New Issue
Block a user