mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-31 02:51:26 +00:00
This covers modules which need to initialize before task_start(), but don't particularly care in what order they're initialized. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=none TEST=if it boots, it works Change-Id: I69829aac8d1c3c14ee04916a794b84bbf03a09eb
30 lines
979 B
C
30 lines
979 B
C
/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
/* 1-wire interface for Chrome EC */
|
|
|
|
/* Note that 1-wire communication is VERY latency-sensitive. If these
|
|
* functions are run at low priority, communication may be garbled. However,
|
|
* these functions are also slow enough (~1ms per call) that it's really not
|
|
* desirable to put them at high priority. So make sure you check the
|
|
* confirmation code from the slave for any communication, and retry a few
|
|
* times in case of failure. */
|
|
|
|
#ifndef __CROS_EC_ONEWIRE_H
|
|
#define __CROS_EC_ONEWIRE_H
|
|
|
|
#include "common.h"
|
|
|
|
/* Reset the 1-wire bus. Returns error if presence detect fails. */
|
|
int onewire_reset(void);
|
|
|
|
/* Read a byte from the 1-wire bus. Returns the byte. */
|
|
int onewire_read(void);
|
|
|
|
/* Write a byte to the 1-wire bus. */
|
|
void onewire_write(int data);
|
|
|
|
#endif /* __CROS_EC_ONEWIRE_H */
|