Files
OpenCellular/firmware/ec/common/inc/ocmp_wrappers/ocmp_debugmdio.h
Vishal Thakur 973eb3b3d1 OpenCellular OCware repo merged to OpenCellular TIP repo.
> 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.
2018-09-28 23:40:11 -07:00

38 lines
999 B
C

/**
* Copyright (c) 2018-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 OCMP_MDIO_H_
#define OCMP_MDIO_H_
#include "common/inc/global/Framework.h"
SCHEMA_IMPORT bool mdio_read(void *driver, void *data);
SCHEMA_IMPORT bool mdio_write(void *driver, void *data);
static const Driver OC_MDIO = {
.name = "OC_MDIO",
.argList = (Parameter[]){
{ .name = "reg_address", .type = TYPE_UINT16 },
{ .name = "reg_values", .type = TYPE_UINT16 },
{}
},
.commands = (Command[]){
{
.name = "get",
.cb_cmd = mdio_read,
},
{
.name = "set",
.cb_cmd = mdio_write,
},
{}
},
};
#endif /* INC_DEVICES_OCMP_WRAPPERS_OCMP_MDIO_H_ */