Skip to content

Commit

Permalink
PlatformIO: check-in a cached copy of generated headers
Browse files Browse the repository at this point in the history
PlatformIO does not have a way to invoke a pre-build step for libraries.
To workaround this, let's cache a copy of there generated headers in
source. Release tooling is also adjusted to update the LibOSDP version
in the cached copies.

Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Nov 10, 2024
1 parent ae86c77 commit 7d41da3
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
42 changes: 42 additions & 0 deletions platformio/osdp_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright (c) 2024 Siddharth Chandrasekaran <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/

#ifndef _OSDP_CONFIG_H_
#define _OSDP_CONFIG_H_

/**
* @brief The following macros are defined defined from the variable in cmake
* files. All @XXX@ are replaced by the value of XXX as resolved by cmake.
*/
#define PROJECT_VERSION "3.0.6"
#define PROJECT_NAME "libosdp"
#define GIT_BRANCH "platformio"
#define GIT_REV ""
#define GIT_TAG ""
#define GIT_DIFF ""
#define REPO_ROOT ""

/**
* @brief Other OSDP constants
*/
#define OSDP_PD_SC_RETRY_MS (600 * 1000)
#define OSDP_PD_POLL_TIMEOUT_MS (50)
#define OSDP_PD_SC_TIMEOUT_MS (8 * 1000)
#define OSDP_PD_ONLINE_TOUT_MS (8 * 1000)
#define OSDP_RESP_TOUT_MS (200)
#define OSDP_CMD_MAX_RETRIES (8)
#define OSDP_ONLINE_RETRY_WAIT_MAX_MS (300 * 1000)
#define OSDP_CMD_RETRY_WAIT_MS (800)
#define OSDP_PACKET_BUF_SIZE (256)
#define OSDP_RX_RB_SIZE (512)
#define OSDP_CP_CMD_POOL_SIZE (4)
#define OSDP_FILE_ERROR_RETRY_MAX (10)
#define OSDP_PD_MAX (126)
#define OSDP_CMD_ID_OFFSET (5)
#define OSDP_PCAP_LINK_TYPE (162)
#define OSDP_PD_NAME_MAXLEN (16)

#endif /* _OSDP_CONFIG_H_ */
14 changes: 14 additions & 0 deletions platformio/osdp_export.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright (c) 2024 Siddharth Chandrasekaran <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/

#ifndef OSDP_EXPORT_H_
#define OSDP_EXPORT_H_

#define OSDP_EXPORT
#define OSDP_NO_EXPORT
#define OSDP_DEPRECATED_EXPORT

#endif /* OSDP_EXPORT_H_ */

0 comments on commit 7d41da3

Please sign in to comment.