mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-01 19:07:51 +00:00
> Changes done : > 1. Shared schema between host and embedded controller. 2. Commands messages are handled at driver level. 3. Debug message type added to enable debugging on i2c, spi and gpio's. 4. Auto test capabilities added to ethernet module. 5. Unit test cases written for multiple devices like LTC4275, LTC4274, LTC4015,ADT7481, PCA9557, SX1509.
66 lines
2.3 KiB
C
66 lines
2.3 KiB
C
/**
|
|
* Copyright (c) 2017-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
#ifndef INC_UTILS_OCMP_UTIL_H_
|
|
#define INC_UTILS_OCMP_UTIL_H_
|
|
|
|
#include "common/inc/global/ocmp_frame.h"
|
|
|
|
#include <stdio.h>
|
|
#include <stdint.h>
|
|
#include <string.h>
|
|
|
|
/*****************************************************************************
|
|
** FUNCTION NAME : OCMP_mallocFrame
|
|
**
|
|
** DESCRIPTION : Allocates memory for OCMP packets.
|
|
**
|
|
** ARGUMENTS : length
|
|
**
|
|
** RETURN TYPE : OCMPMessageFrame
|
|
**
|
|
*****************************************************************************/
|
|
|
|
OCMPMessageFrame * OCMP_mallocFrame(uint16_t len);
|
|
|
|
/*****************************************************************************
|
|
** FUNCTION NAME : create_ocmp_msg_frame
|
|
**
|
|
** DESCRIPTION : Create a OCMP message.
|
|
**
|
|
** ARGUMENTS : None
|
|
**
|
|
** RETURN TYPE : OCMPMessageFrame
|
|
**
|
|
*****************************************************************************/
|
|
OCMPMessageFrame* create_ocmp_msg_frame(OCMPSubsystem subSystem,
|
|
OCMPMsgType msgtype,
|
|
OCMPActionType actionType,
|
|
uint8_t componentId,
|
|
uint16_t parameters,
|
|
uint8_t payloadSize);
|
|
|
|
|
|
/*****************************************************************************
|
|
** FUNCTION NAME : create_ocmp_alert_from_Evt
|
|
**
|
|
** DESCRIPTION : Create the OCMP Alert frame from the Event message.
|
|
**
|
|
** ARGUMENTS : OCMPMessageFrame to be used to create Alert,
|
|
** ComponentId,
|
|
** ParemeterID
|
|
**
|
|
** RETURN TYPE : OCMPMessageFrame
|
|
**
|
|
*****************************************************************************/
|
|
OCMPMessageFrame* create_ocmp_alert_from_Evt(OCMPMessageFrame* ocmpEventMsg,
|
|
uint8_t componentId,
|
|
uint16_t parameters );
|
|
|
|
#endif /* INC_UTILS_OCMP_UTIL_H_ */
|