Home | History | Annotate | Download | only in f54test
      1 /*
      2  * Copyright (C) 2014 Satoshi Noguchi
      3  * Copyright (C) 2014 Synaptics Inc
      4  *
      5  * Licensed under the Apache License, Version 2.0 (the "License");
      6  * you may not use this file except in compliance with the License.
      7  * You may obtain a copy of the License at
      8  *
      9  *      http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  * Unless required by applicable law or agreed to in writing, software
     12  * distributed under the License is distributed on an "AS IS" BASIS,
     13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  * See the License for the specific language governing permissions and
     15  * limitations under the License.
     16  */
     17 
     18 #ifndef _TESTUTIL_H_
     19 #define _TESTUTIL_H_
     20 
     21 enum update_error {
     22 	TEST_SUCCESS				= 0,
     23 	TEST_FAIL,
     24 	TEST_FAIL_TIMEOUT,
     25 	TEST_FAIL_NO_FUNCTION_01,
     26 	TEST_FAIL_NO_FUNCTION_54,
     27 	TEST_FAIL_NO_FUNCTION_55,
     28 	TEST_FAIL_QUERY_BASIC_PROPERTIES,
     29 	TEST_FAIL_READ_F54_QUERIES,
     30 	TEST_FAIL_READ_F54_CONTROLS,
     31 	TEST_FAIL_SCAN_PDT,
     32 	TEST_FAIL_READ_DEVICE_STATUS,
     33 	TEST_FAIL_READ_F01_CONTROL_0,
     34 	TEST_FAIL_WRITE_F01_CONTROL_0,
     35 	TEST_FAIL_TIMEOUT_WAITING_FOR_ATTN,
     36 	TEST_FAIL_INVALID_PARAMETER,
     37 	TEST_FAIL_MEMORY_ALLOCATION,
     38 };
     39 
     40 const char * test_err_to_string(int err);
     41 
     42 unsigned long extract_long(const unsigned char *data);
     43 unsigned short extract_short(const unsigned char *data);
     44 const char * StripPath(const char * path, ssize_t size);
     45 
     46 #endif // _TESTUTIL_H_
     47