| // Copyright 2021 The Fuchsia Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| library fuchsia.camera.debug; | |
| using zx; | |
| /// Maximum number of test pattern modes. | |
| const MAX_TEST_PATTERN_MODES uint8 = 64; | |
| /// Maximum number of test pattern data parameters. | |
| const MAX_TEST_PATTERN_DATA uint16 = 128; | |
| /// This interface can be attached to various blocks in the camera stack to expose debug-only | |
| /// functionality. Not all blocks will implement all methods in this protocol and may instead | |
| /// choose to return ZX_ERR_NOT_SUPPORTED. | |
| @discoverable | |
| closed protocol Debug { | |
| /// Retrieves the available test pattern modes supported by the block. | |
| strict GetAvailableTestPatternModes() -> (struct { | |
| modes vector<uint32>:MAX_TEST_PATTERN_MODES; | |
| }) error zx.Status; | |
| /// Retrieves the test pattern mode the block is currently set to. | |
| strict GetCurrentTestPatternMode() -> (struct { | |
| value uint16; | |
| }) error zx.Status; | |
| /// Changes the block's test pattern mode. | |
| strict SetTestPatternMode(struct { | |
| mode uint16; | |
| }) -> () error zx.Status; | |
| /// Retrieves the test pattern data being used. | |
| strict GetTestPatternData() -> (struct { | |
| data vector<uint32>:MAX_TEST_PATTERN_DATA; | |
| }) error zx.Status; | |
| /// Changes data passed into the test pattern. Only used by certain modes. | |
| strict SetTestPatternData(struct { | |
| data vector<uint32>:MAX_TEST_PATTERN_DATA; | |
| }) -> () error zx.Status; | |
| }; |