cfb6257327
The error handling code currently has a couple of issues: * It relies on ordered lists and upstream not changing any constants. * Converted messages are not stored in constant memory which means that log_strdup is needed whenever they are printed. This change also factors out error handling to a separate file, lw_priv.{c,h}, to facilitate reuse in a future secure element and state storage implementation. Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
17 lines
438 B
C
17 lines
438 B
C
/*
|
|
* Copyright (c) 2020 Andreas Sandberg
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#ifndef ZEPHYR_SUBSYS_LORAWAN_LW_PRIV_H_
|
|
#define ZEPHYR_SUBSYS_LORAWAN_LW_PRIV_H_
|
|
|
|
const int lorawan_status2errno(unsigned int status);
|
|
const char *lorawan_status2str(unsigned int status);
|
|
|
|
const int lorawan_eventinfo2errno(unsigned int status);
|
|
const char *lorawan_eventinfo2str(unsigned int status);
|
|
|
|
#endif /* ZEPHYR_SUBSYS_LORAWAN_LW_PRIV_H_ */
|