cr50: add support for creating multiple serial endpoints

CR50 will need three serial endpoints for the streaming AP and EC UART
and exporting its own console through USB. This change adds a macro to
create endpoints that can be recognized by the usb_serial driver.

BUG=chrome-os-partner:50702
BRANCH=none
TEST=Verify "/dev/google/Cr50*/serial/Blob" prints capital letters when
lower case letters are input.

Change-Id: Iddf2c957a00dc3cd5448a6a00de2cf61ef5dd84c
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/336441
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
Mary Ruthven
2016-03-30 10:27:58 -07:00
committed by chrome-bot
parent 55032aa123
commit fa643a9fc7
10 changed files with 461 additions and 360 deletions

View File

@@ -1,26 +0,0 @@
/* Copyright 2015 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.
*/
/* Generic API for handling opaque blobs of data. */
#ifndef __CROS_EC_BLOB_H
#define __CROS_EC_BLOB_H
#include <stddef.h>
#include <stdint.h>
/* Call this to send data to the blob-handler */
size_t put_bytes_to_blob(uint8_t *buffer, size_t count);
/* Call this to get data back fom the blob-handler */
size_t get_bytes_from_blob(uint8_t *buffer, size_t count);
/* Implement this to be notified when the blob-handler can take more data */
void blob_is_ready_for_more_bytes(void);
/* Implement this to be notified when the blob-handler has data to give us */
void blob_is_ready_to_emit_bytes(void);
#endif /* __CROS_EC_BLOB_H */