Home | History | Annotate | Download | only in tests
      1 /*
      2  * Copyright (C) 2017 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  *
     16  */
     17 
     18 #ifndef ESE_OPERATIONS_INTERFACE_H_
     19 #define ESE_OPERATIONS_INTERFACE_H_ 1
     20 
     21 #include <ese/ese.h>
     22 
     23 class EseOperationsInterface {
     24  public:
     25   EseOperationsInterface() { }
     26   virtual ~EseOperationsInterface() { };
     27 
     28   virtual int EseOpen(struct EseInterface *ese, void *data) = 0;
     29   virtual uint32_t EseHwReceive(struct EseInterface *ese, uint8_t *data, uint32_t len, int complete) = 0;
     30   virtual uint32_t EseHwTransmit(struct EseInterface *ese, const uint8_t *data, uint32_t len, int complete) = 0;
     31   virtual int EseReset(struct EseInterface *ese) = 0;
     32   virtual uint32_t EseTransceive(struct EseInterface *ese, const struct EseSgBuffer *tx_sg, uint32_t tx_nsg,
     33                                  struct EseSgBuffer *rx_sg, uint32_t rx_nsg) = 0;
     34   virtual int EsePoll(struct EseInterface *ese, uint8_t poll_for, float timeout, int complete) = 0;
     35   virtual void EseClose(struct EseInterface *ese) = 0;
     36 };
     37 
     38 #endif  // ESE_OPERATIONS_INTERFACE_H_
     39