Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
662db0c5
Commit
662db0c5
authored
Feb 18, 2021
by
Adam Wujek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kconfig: add optization to remove slaveOnly
Signed-off-by:
Adam Wujek
<
adam.wujek@creotech.pl
>
parent
236a53ce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
3 deletions
+18
-3
Kconfig
Kconfig
+16
-1
ppsi.h
include/ppsi/ppsi.h
+1
-1
open-close.c
proto-standard/open-close.c
+1
-1
No files found.
Kconfig
View file @
662db0c5
...
...
@@ -345,6 +345,15 @@ config CODEOPT_EXT_PORT_CONF_FORCE_DISABLED
externalPortConfiguration set to false to reduce the footprint.
Saves ~1500B on WRPC
config CODEOPT_SO_FORCE_DISABLED
boolean "Force disabled slaveOnly"
depends on CODEOPT_ENABLED
default y if ARCH_WRPC
default n
help
Force slaveOnly to false to reduce the footprint.
Saves ~650B.
choice
prompt "Exclusive options"
...
...
@@ -362,7 +371,7 @@ choice
config CODEOPT_SO_ENABLED
boolean "Force slaveOnly mode to true"
depends on CODEOPT_ENABLED && SINGLE_PORT
depends on CODEOPT_ENABLED && SINGLE_PORT
&& !CODEOPT_SO_FORCE_DISABLED
help
slaveOnly is set to true and cannot be changed.
It implies that the number of port instances must be set to 1.
...
...
@@ -460,6 +469,12 @@ config HAS_CODEOPT_EXT_PORT_CONF_FORCE_DISABLED
default 1 if CODEOPT_EXT_PORT_CONF_FORCE_DISABLED
default 0
config HAS_CODEOPT_SO_FORCE_DISABLED
int
range 0 1
default 1 if CODEOPT_SO_FORCE_DISABLED
default 0
config HAS_CODEOPT_EPC_ENABLED
int
range 0 1
...
...
include/ppsi/ppsi.h
View file @
662db0c5
...
...
@@ -188,7 +188,7 @@ static inline int is_delayMechanismE2E(struct pp_instance *ppi) {
}
static
inline
int
is_slaveOnly
(
defaultDS_t
*
def
)
{
return
CONFIG_HAS_CODEOPT_EPC_ENABLED
==
0
&&
def
->
slaveOnly
;
return
CONFIG_HAS_CODEOPT_
SO_FORCE_DISABLED
==
0
&&
CONFIG_HAS_CODEOPT_
EPC_ENABLED
==
0
&&
def
->
slaveOnly
;
}
static
inline
int
get_numberPorts
(
defaultDS_t
*
def
)
{
...
...
proto-standard/open-close.c
View file @
662db0c5
...
...
@@ -103,7 +103,7 @@ int pp_init_globals(struct pp_globals *ppg, struct pp_runtime_opts *pp_rt_opts)
def
->
externalPortConfigurationEnabled
=
pp_rt_opts
->
externalPortConfigurationEnabled
;
def
->
slaveOnly
=
rt_opts
->
slaveOnly
;
if
(
is_externalPortConfigurationEnabled
(
def
)
)
{
if
(
def
->
slaveOnly
)
{
if
(
is_slaveOnly
(
def
)
)
{
pp_printf
(
"ppsi: Incompatible configuration: SlaveOnly and externalPortConfigurationEnabled
\n
"
);
def
->
slaveOnly
=
FALSE
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment