Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hn70ap
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
hn70ap
Commits
fb7b65df
Commit
fb7b65df
authored
6 years ago
by
f4grx
Browse files
Options
Downloads
Patches
Plain Diff
Enable heartbeat LED, update defconfigs
parent
2dec6b61
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
apps/libhn70ap/leds.c
+2
-0
2 additions, 0 deletions
apps/libhn70ap/leds.c
apps/libhn70ap/timer.c
+25
-4
25 additions, 4 deletions
apps/libhn70ap/timer.c
build/beacon/defconfig
+65
-5
65 additions, 5 deletions
build/beacon/defconfig
build/full/defconfig
+40
-28
40 additions, 28 deletions
build/full/defconfig
with
132 additions
and
37 deletions
apps/libhn70ap/leds.c
+
2
−
0
View file @
fb7b65df
...
...
@@ -50,6 +50,8 @@
int
leds_init
(
void
)
{
/* TODO open driver once and for all to speed up led update? */
return
0
;
}
int
leds_state
(
int
lednum
,
int
state
)
...
...
This diff is collapsed.
Click to expand it.
apps/libhn70ap/timer.c
+
25
−
4
View file @
fb7b65df
...
...
@@ -38,10 +38,13 @@
#include
<stdint.h>
#include
<stdbool.h>
#include
<pthread.h>
#include
<syslog.h>
#include
<semaphore.h>
#include
<time.h>
#include
<hn70ap/timer.h>
#include
<hn70ap/leds.h>
struct
timer_s
{
...
...
@@ -56,6 +59,9 @@ struct timer_s
struct
timer_s
*
g_timers_head
;
struct
timer_s
*
g_timers_tail
;
static
pthread_t
g_timerthreadid
;
static
int
heartbeat
;
void
*
timer_thread
(
void
*
arg
)
{
sem_t
sem
;
...
...
@@ -63,11 +69,12 @@ void *timer_thread(void *arg)
sem_init
(
&
sem
,
0
,
0
);
printf
(
"Starting timer thread
\n
"
);
syslog
(
LOG_INFO
,
"Starting timer thread
\n
"
);
clock_gettime
(
CLOCK_REALTIME
,
&
tout
);
while
(
true
)
{
clock_gettime
(
CLOCK_REALTIME
,
&
tout
);
tout
.
tv_nsec
+=
100000000
;
if
(
tout
.
tv_nsec
>
1000000000
)
{
...
...
@@ -75,18 +82,32 @@ void *timer_thread(void *arg)
tout
.
tv_sec
+=
1
;
}
sem_timedwait
(
&
sem
,
&
tout
);
printf
(
"tick
\n
"
);
/* Toggle the heartbeat LED */
leds_state
(
LED_HEARTBEAT
,
(
heartbeat
<
9
)
?
LED_STATE_OFF
:
LED_STATE_ON
);
heartbeat
+=
1
;
if
(
heartbeat
==
10
)
heartbeat
=
0
;
/* Look at the next timer */
}
return
NULL
;
}
int
timer_init
(
void
)
{
int
ret
;
g_timers_head
=
NULL
;
g_timers_tail
=
NULL
;
return
0
;
heartbeat
=
0
;
ret
=
pthread_create
(
&
g_timerthreadid
,
NULL
,
timer_thread
,
NULL
);
return
ret
;
}
int
timer_add
(
void
(
*
callback
)(
void
*
arg
),
void
*
arg
,
uint32_t
delay
,
bool
repeat
)
{
return
-
1
;
}
This diff is collapsed.
Click to expand it.
build/beacon/defconfig
+
65
−
5
View file @
fb7b65df
...
...
@@ -131,6 +131,7 @@ CONFIG_ARCH="arm"
# CONFIG_ARCH_CHIP_LPC43XX is not set
# CONFIG_ARCH_CHIP_LPC54XX is not set
# CONFIG_ARCH_CHIP_MOXART is not set
# CONFIG_ARCH_CHIP_NRF52 is not set
# CONFIG_ARCH_CHIP_NUC1XX is not set
# CONFIG_ARCH_CHIP_SAMA5 is not set
# CONFIG_ARCH_CHIP_SAMD is not set
...
...
@@ -474,7 +475,7 @@ CONFIG_STM32_DMA2=y
# CONFIG_STM32_DAC1 is not set
# CONFIG_STM32_DAC2 is not set
# CONFIG_STM32_DCMI is not set
#
CONFIG_STM32_ETHMAC
is not set
CONFIG_STM32_ETHMAC
=y
# CONFIG_STM32_FSMC is not set
# CONFIG_STM32_HASH is not set
# CONFIG_HRTIM is not set
...
...
@@ -602,6 +603,27 @@ CONFIG_STM32_I2CTIMEOTICKS=500
# CONFIG_STM32_HAVE_RTC_COUNTER is not set
# CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set
#
# Ethernet MAC configuration
#
CONFIG_STM32_PHYADDR=0
CONFIG_STM32_PHYINIT=y
# CONFIG_STM32_MII is not set
CONFIG_STM32_AUTONEG=y
CONFIG_STM32_PHYSR=30
CONFIG_STM32_PHYSR_ALTCONFIG=y
CONFIG_STM32_PHYSR_ALTMODE=0x0007
CONFIG_STM32_PHYSR_10HD=0x0001
CONFIG_STM32_PHYSR_100HD=0x0002
CONFIG_STM32_PHYSR_10FD=0x0005
CONFIG_STM32_PHYSR_100FD=0x0006
# CONFIG_STM32_ETH_PTP is not set
CONFIG_STM32_RMII=y
# CONFIG_STM32_RMII_MCO1 is not set
# CONFIG_STM32_RMII_MCO2 is not set
CONFIG_STM32_RMII_EXTCLK=y
CONFIG_STM32_ETHMAC_HPWORK=y
#
# USB FS Host Configuration
#
...
...
@@ -716,7 +738,8 @@ CONFIG_ARCH_LEDS=y
CONFIG_HN70AP_EEPROM=y
CONFIG_HN70AP_SPIFLASH=y
CONFIG_HN70AP_SCREEN=y
# CONFIG_HN70AP_ETHERNET is not set
CONFIG_HN70AP_ETHERNET=y
CONFIG_HN70AP_ETHERNET_EEMAC=y
CONFIG_HN70AP_RADIO=y
# CONFIG_HN70AP_MAINRADIO is not set
CONFIG_HN70AP_AUXRADIO=y
...
...
@@ -1054,6 +1077,36 @@ CONFIG_NETDEVICES=y
# CONFIG_ENCX24J600 is not set
# CONFIG_NET_SLIP is not set
# CONFIG_NET_FTMAC100 is not set
#
# External Ethernet PHY Device Support
#
CONFIG_ARCH_PHY_INTERRUPT=y
# CONFIG_ETH0_PHY_NONE is not set
# CONFIG_ETH0_PHY_AM79C874 is not set
# CONFIG_ETH0_PHY_KS8721 is not set
# CONFIG_ETH0_PHY_KSZ8041 is not set
# CONFIG_ETH0_PHY_KSZ8051 is not set
# CONFIG_ETH0_PHY_KSZ8061 is not set
CONFIG_ETH0_PHY_KSZ8081=y
# CONFIG_ETH0_PHY_KSZ90x1 is not set
# CONFIG_ETH0_PHY_DP83848C is not set
# CONFIG_ETH0_PHY_LAN8720 is not set
# CONFIG_ETH0_PHY_LAN8740 is not set
# CONFIG_ETH0_PHY_LAN8740A is not set
# CONFIG_ETH0_PHY_LAN8742A is not set
# CONFIG_ETH0_PHY_DM9161 is not set
CONFIG_ETH1_PHY_NONE=y
# CONFIG_ETH1_PHY_AM79C874 is not set
# CONFIG_ETH1_PHY_KS8721 is not set
# CONFIG_ETH1_PHY_KSZ8041 is not set
# CONFIG_ETH1_PHY_KSZ8051 is not set
# CONFIG_ETH1_PHY_KSZ8081 is not set
# CONFIG_ETH1_PHY_KSZ90x1 is not set
# CONFIG_ETH1_PHY_DP83848C is not set
# CONFIG_ETH1_PHY_LAN8720 is not set
# CONFIG_ETH1_PHY_DM9161 is not set
# CONFIG_NETDEV_PHY_DEBUG is not set
# CONFIG_PIPES is not set
# CONFIG_PM is not set
# CONFIG_DRIVERS_POWERLED is not set
...
...
@@ -1142,6 +1195,11 @@ CONFIG_GENERICRADIO_SI4463=y
CONFIG_GENERICRADIO_SI4463_FRAMING_L2B=y
# CONFIG_GENERICRADIO_SI4463_FRAMING_L2L is not set
CONFIG_GENERICRADIO_SI4463_USE_WDS_CONFIG=y
# CONFIG_GENERICRADIO_SI4463_DEFAULT_SYNCWORD_NONE is not set
# CONFIG_GENERICRADIO_SI4463_DEFAULT_SYNCWORD_A55A is not set
# CONFIG_GENERICRADIO_SI4463_DEFAULT_SYNCWORD_4242 is not set
# CONFIG_GENERICRADIO_SI4463_DEFAULT_SYNCWORD_A55AA55A is not set
# CONFIG_GENERICRADIO_SI4463_DEFAULT_SYNCWORD_42424242 is not set
# CONFIG_WL_NRF24L01 is not set
# CONFIG_DRIVERS_CONTACTLESS is not set
...
...
@@ -1165,7 +1223,7 @@ CONFIG_SYSLOG_CONSOLE=y
# Networking Support
#
CONFIG_ARCH_HAVE_NET=y
#
CONFIG_ARCH_HAVE_PHY
is not set
CONFIG_ARCH_HAVE_PHY
=y
# CONFIG_NET_WRITE_BUFFERS is not set
CONFIG_NET_READAHEAD=y
CONFIG_NET=y
...
...
@@ -1207,7 +1265,7 @@ CONFIG_NET_IPv4=y
CONFIG_NSOCKET_DESCRIPTORS=8
CONFIG_NET_NACTIVESOCKETS=16
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_TCPPROTO_OPTIONS
=y
#
CONFIG_NET_TCPPROTO_OPTIONS
is not set
# CONFIG_NET_SOLINGER is not set
#
...
...
@@ -1225,7 +1283,7 @@ CONFIG_NET_TCPPROTO_OPTIONS=y
#
CONFIG_NET_TCP=y
# CONFIG_NET_TCP_NO_STACK is not set
CONFIG_NET_TCP_KEEPALIVE
=y
#
CONFIG_NET_TCP_KEEPALIVE
is not set
# CONFIG_NET_TCPURGDATA is not set
# CONFIG_NET_TCP_REASSEMBLY is not set
CONFIG_NET_TCP_CONNS=8
...
...
@@ -1319,6 +1377,7 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue"
# CONFIG_NFS is not set
# CONFIG_FS_NXFFS is not set
# CONFIG_FS_ROMFS is not set
# CONFIG_FS_CROMFS is not set
# CONFIG_FS_TMPFS is not set
CONFIG_FS_SMARTFS=y
CONFIG_SMARTFS_ERASEDSTATE=0xff
...
...
@@ -1565,6 +1624,7 @@ CONFIG_EXAMPLES_NSH=y
# CONFIG_EXAMPLES_SERIALBLASTER is not set
# CONFIG_EXAMPLES_SERIALRX is not set
# CONFIG_EXAMPLES_SERLOOP is not set
# CONFIG_EXAMPLES_SI5351 is not set
# CONFIG_EXAMPLES_SLCD is not set
# CONFIG_EXAMPLES_SMART is not set
# CONFIG_EXAMPLES_SMART_TEST is not set
...
...
This diff is collapsed.
Click to expand it.
build/full/defconfig
+
40
−
28
View file @
fb7b65df
...
...
@@ -131,6 +131,7 @@ CONFIG_ARCH="arm"
# CONFIG_ARCH_CHIP_LPC43XX is not set
# CONFIG_ARCH_CHIP_LPC54XX is not set
# CONFIG_ARCH_CHIP_MOXART is not set
# CONFIG_ARCH_CHIP_NRF52 is not set
# CONFIG_ARCH_CHIP_NUC1XX is not set
# CONFIG_ARCH_CHIP_SAMA5 is not set
# CONFIG_ARCH_CHIP_SAMD is not set
...
...
@@ -747,6 +748,7 @@ CONFIG_HN70AP_AUXRADIO=y
CONFIG_LIB_BOARDCTL=y
CONFIG_BOARDCTL_RESET=y
# CONFIG_BOARDCTL_UNIQUEID is not set
# CONFIG_BOARDCTL_APP_SYMTAB is not set
# CONFIG_BOARDCTL_IOCTL is not set
#
...
...
@@ -1116,28 +1118,6 @@ CONFIG_SERIAL=y
# CONFIG_SERIAL_REMOVABLE is not set
CONFIG_SERIAL_CONSOLE=y
# CONFIG_16550_UART is not set
# CONFIG_UART_SERIALDRIVER is not set
# CONFIG_UART0_SERIALDRIVER is not set
# CONFIG_UART1_SERIALDRIVER is not set
# CONFIG_UART2_SERIALDRIVER is not set
# CONFIG_UART3_SERIALDRIVER is not set
CONFIG_UART4_SERIALDRIVER=y
# CONFIG_UART5_SERIALDRIVER is not set
# CONFIG_UART6_SERIALDRIVER is not set
# CONFIG_UART7_SERIALDRIVER is not set
# CONFIG_UART8_SERIALDRIVER is not set
# CONFIG_SCI0_SERIALDRIVER is not set
# CONFIG_SCI1_SERIALDRIVER is not set
# CONFIG_USART0_SERIALDRIVER is not set
# CONFIG_USART1_SERIALDRIVER is not set
# CONFIG_USART2_SERIALDRIVER is not set
# CONFIG_USART3_SERIALDRIVER is not set
# CONFIG_USART4_SERIALDRIVER is not set
# CONFIG_USART5_SERIALDRIVER is not set
# CONFIG_USART6_SERIALDRIVER is not set
# CONFIG_USART7_SERIALDRIVER is not set
# CONFIG_USART8_SERIALDRIVER is not set
# CONFIG_USART9_SERIALDRIVER is not set
# CONFIG_OTHER_UART_SERIALDRIVER is not set
CONFIG_MCU_SERIAL=y
CONFIG_STANDARD_SERIAL=y
...
...
@@ -1151,6 +1131,16 @@ CONFIG_SERIAL_TERMIOS=y
CONFIG_UART4_SERIAL_CONSOLE=y
# CONFIG_OTHER_SERIAL_CONSOLE is not set
# CONFIG_NO_SERIAL_CONSOLE is not set
# CONFIG_UART_SERIALDRIVER is not set
# CONFIG_UART0_SERIALDRIVER is not set
# CONFIG_UART1_SERIALDRIVER is not set
# CONFIG_UART2_SERIALDRIVER is not set
# CONFIG_UART3_SERIALDRIVER is not set
CONFIG_UART4_SERIALDRIVER=y
# CONFIG_UART5_SERIALDRIVER is not set
# CONFIG_UART6_SERIALDRIVER is not set
# CONFIG_UART7_SERIALDRIVER is not set
# CONFIG_UART8_SERIALDRIVER is not set
#
# UART4 Configuration
...
...
@@ -1164,6 +1154,28 @@ CONFIG_UART4_2STOP=0
# CONFIG_UART4_IFLOWCONTROL is not set
# CONFIG_UART4_OFLOWCONTROL is not set
# CONFIG_UART4_DMA is not set
# CONFIG_LPUART_SERIALDRIVER is not set
# CONFIG_LPUART0_SERIALDRIVER is not set
# CONFIG_LPUART1_SERIALDRIVER is not set
# CONFIG_LPUART2_SERIALDRIVER is not set
# CONFIG_LPUART3_SERIALDRIVER is not set
# CONFIG_LPUART4_SERIALDRIVER is not set
# CONFIG_LPUART5_SERIALDRIVER is not set
# CONFIG_LPUART6_SERIALDRIVER is not set
# CONFIG_LPUART7_SERIALDRIVER is not set
# CONFIG_LPUART8_SERIALDRIVER is not set
# CONFIG_USART0_SERIALDRIVER is not set
# CONFIG_USART1_SERIALDRIVER is not set
# CONFIG_USART2_SERIALDRIVER is not set
# CONFIG_USART3_SERIALDRIVER is not set
# CONFIG_USART4_SERIALDRIVER is not set
# CONFIG_USART5_SERIALDRIVER is not set
# CONFIG_USART6_SERIALDRIVER is not set
# CONFIG_USART7_SERIALDRIVER is not set
# CONFIG_USART8_SERIALDRIVER is not set
# CONFIG_USART9_SERIALDRIVER is not set
# CONFIG_SCI0_SERIALDRIVER is not set
# CONFIG_SCI1_SERIALDRIVER is not set
# CONFIG_PSEUDOTERM is not set
# CONFIG_USBDEV is not set
# CONFIG_USBHOST is not set
...
...
@@ -1176,10 +1188,7 @@ CONFIG_DRIVERS_WIRELESS=y
# CONFIG_SPIRIT_NETDEV is not set
# CONFIG_DRIVERS_IEEE802154 is not set
# CONFIG_DRIVERS_IEEE80211 is not set
CONFIG_DRIVERS_GENERICRADIO=y
CONFIG_GENERICRADIO_UPPER=y
CONFIG_GENERICRADIO_SI4463=y
CONFIG_GENERICRADIO_SI4463_USE_WDS_CONFIG=y
# CONFIG_DRIVERS_GENERICRADIO is not set
# CONFIG_WL_NRF24L01 is not set
# CONFIG_DRIVERS_CONTACTLESS is not set
...
...
@@ -1245,7 +1254,7 @@ CONFIG_NET_IPv4=y
CONFIG_NSOCKET_DESCRIPTORS=8
CONFIG_NET_NACTIVESOCKETS=16
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_TCPPROTO_OPTIONS
=y
#
CONFIG_NET_TCPPROTO_OPTIONS
is not set
# CONFIG_NET_SOLINGER is not set
#
...
...
@@ -1263,7 +1272,7 @@ CONFIG_NET_TCPPROTO_OPTIONS=y
#
CONFIG_NET_TCP=y
# CONFIG_NET_TCP_NO_STACK is not set
CONFIG_NET_TCP_KEEPALIVE
=y
#
CONFIG_NET_TCP_KEEPALIVE
is not set
# CONFIG_NET_TCPURGDATA is not set
# CONFIG_NET_TCP_REASSEMBLY is not set
CONFIG_NET_TCP_CONNS=8
...
...
@@ -1357,6 +1366,7 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue"
# CONFIG_NFS is not set
# CONFIG_FS_NXFFS is not set
# CONFIG_FS_ROMFS is not set
# CONFIG_FS_CROMFS is not set
# CONFIG_FS_TMPFS is not set
CONFIG_FS_SMARTFS=y
CONFIG_SMARTFS_ERASEDSTATE=0xff
...
...
@@ -1498,6 +1508,7 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048
# CONFIG_LIBC_MODLIB is not set
# CONFIG_LIBC_WCHAR is not set
# CONFIG_LIBC_LOCALE is not set
# CONFIG_LIBC_LZF is not set
#
# Time/Time Zone Support
...
...
@@ -1656,6 +1667,7 @@ CONFIG_FSUTILS_MKSMARTFS=y
#
# hn70ap apps
#
# CONFIG_HN70AP_BEACON is not set
CONFIG_HN70AP_CONFIG=y
CONFIG_HN70AP_CONFIG_PRIORITY=100
CONFIG_HN70AP_CONFIG_STACKSIZE=2048
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment