blob: 0e5b8031a2b9d2f41f08e87e31a3bcadc77ae7dc [file] [log] [blame]
Shad Ansari2f7f9be2017-06-07 13:34:53 -07001/******************************************************************************
2 *
3 * <:copyright-BRCM:2016:DUAL/GPL:standard
4 *
5 * Copyright (c) 2016 Broadcom
6 * All Rights Reserved
7 *
8 * Unless you and Broadcom execute a separate written software license
9 * agreement governing use of this software, this software is licensed
10 * to you under the terms of the GNU General Public License version 2
11 * (the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
12 * with the following added to such license:
13 *
14 * As a special exception, the copyright holders of this software give
15 * you permission to link this software with independent modules, and
16 * to copy and distribute the resulting executable under terms of your
17 * choice, provided that you also meet, for each linked independent
18 * module, the terms and conditions of the license of that module.
19 * An independent module is a module which is not derived from this
20 * software. The special exception does not apply to any modifications
21 * of the software.
22 *
23 * Not withstanding the above, under no circumstances may you combine
24 * this software in any way with any other Broadcom software provided
25 * under a license other than the GPL, without Broadcom's express prior
26 * written consent.
27 *
28 * :>
29 *
30 *****************************************************************************/
31
32/**
33 * @file fsm_common.h
34 * @brief Common code to support the BAL Access Terminal FSMs
35 *
36 * @ingroup core
37 */
38#ifndef FSM_COMMON_H
39#define FSM_COMMON_H
40
41/*@{*/
42
43#include <bal_common.h>
44#include <bal_obj.h>
45
46#define TIMER_DURATION_1_SEC (1000)
47#define TIMER_DURATION_IN_SEC(time_in_seconds) (TIMER_DURATION_1_SEC*time_in_seconds)
48
49
50extern bcmos_errno mgmt_msg_send_balapi_rsp(bcmos_errno cmd_status,
51 void *msg_payload,
52 bcmbal_obj_msg_type oper_type,
53 dev_log_id log_id);
54
55extern bcmos_errno mgmt_msg_send_balapi_ind(bcmos_errno cmd_status,
56 void *msg_payload, /* If this is NULL, there is no message body */
57 dev_log_id log_id);
58
59extern bcmos_errno mgmt_msg_send_balapi_auto_ind(bcmos_errno cmd_status,
60 void *msg_payload, /* If this is NULL, there is no message body */
61 dev_log_id log_id);
62
63extern bcmos_errno fsm_timer_start(bcmos_timer *p_timer_inst,
64 void *p_inst,
65 F_bcmos_timer_handler p_timer_expiry_handler,
66 uint32_t delay, /* delay is in mS */
67 dev_log_id log_id);
68
69extern void fsm_timer_stop(bcmos_timer *p_timer_inst);
70
71/*@}*/
72
73#endif /*FSM_COMMON_H */