Atmel Software Framework

uhi_aoa.c File Reference

Android Open Accessory.

Copyright (C) 2012 Atmel Corporation. All rights reserved.

#include "conf_usb_host.h"
#include "usb_protocol_aoa.h"
#include "uhd.h"
#include "uhc.h"
#include "conf_aoa.h"
#include "uhi_aoa.h"
#include <string.h>

Data Structures

struct  uhi_aoa_dev_t
 Stores relevant information about the USB connection. More...
 

Macros

Stages of enabling the Android Device
#define AOA_ENABLE_STAGE_PROCESSING   0
 
#define AOA_ENABLE_STAGE_SUCCESSFUL   1
 
#define AOA_ENABLE_STAGE_FAILED   2
 

Functions

Functions required by UHC
uhc_enum_status_t uhi_aoa_install (uhc_device_t *dev)
 Functions required by UHC. More...
 
void uhi_aoa_enable (uhc_device_t *dev)
 
void uhi_aoa_uninstall (uhc_device_t *dev)
 
Routines to initialize the Android device
void uhi_aoa_send_info_string (uint8_t, char *, uhd_callback_setup_end_t)
 Function to send Identifying Information to the Android Device. More...
 
Routines to communicate with the Android device
bool uhi_aoa_read (uint8_t *payload, uint16_t payload_size, uhd_callback_trans_t callback_end)
 Main Function to receive a message from an Android device. More...
 
bool uhi_aoa_write (uint8_t *payload, uint16_t payload_size, uhd_callback_trans_t callback_end)
 Main Function to send a message to an Android device. More...
 

Variables

volatile uint8_t uhi_aoa_enable_stage
 Stores the status of the process enabling the Accessory device. More...
 
volatile uint16_t uhi_aoa_protocol
 Stores the "Android Open Accessory Protocol" version. More...
 

Internal Defines and Variables to store information about the Accessory

#define uhi_aoa_dev_sel   (&uhi_aoa_dev)
 Current USB device AOA selected by the UHI AOA. More...
 
#define AOA_STRING_MANUFACTURER   "Atmel"
 
#define AOA_STRING_MODEL   "EVK1105"
 
#define AOA_STRING_DESCRIPTION   "EVK1105 Application Board"
 
#define AOA_STRING_VERSION   "1.0"
 
#define AOA_STRING_URL   "http://www.atmel.com/applications/homeentertainment/mobile_accessories/default.aspx"
 
#define AOA_STRING_SERIAL   "0000000012345678"
 
static struct uhi_aoa_dev_t uhi_aoa_dev
 
void uhi_aoa_mode_enable_step1 (uhc_device_t *)
 Function to enable the Accessory Mode on Android Devices. More...
 
void uhi_aoa_mode_enable_step2 (usb_add_t, uhd_trans_status_t, uint16_t)
 Function to enable the Accessory Mode on Android Devices. More...
 
void uhi_aoa_mode_enable_step3 (usb_add_t, uhd_trans_status_t, uint16_t)
 Function to enable the Accessory Mode on Android Devices. More...
 
void uhi_aoa_mode_enable_complete (usb_add_t, uhd_trans_status_t, uint16_t)
 Function to enable the Accessory Mode on Android Devices. More...