USB OTG driver

by stanly » Tue, 18 Jan 2011 00:12:18 GMT


Sponsored Links
 hi all,

does newest kernel version support for usb OTG driver?
I found that it works before, but now fail,
how can I build for OTG driver?

thanks

-- 



Re: USB OTG driver

by Steve Modica » Thu, 20 Jan 2011 03:16:40 GMT


 Hello Tsai,

I'm working on the same thing.  I've noticed that OTG is not working on my 
beagleboard or my Nexus S phone.  

What did you have working before?  Can you tell me what config you built with?

Steve





--
Steve Modica
CTO -  Small Tree Communications
www.small-tree.com
phone: 651-209-6509 ext 301
mobile: 651-261-3201






-- 


Sponsored Links


Other Threads

1. Memory Leak in my map overlay

I have been banging away at this one for weeks and I feel like I have
exhausted my research capabilities.  I am hoping that someone will see
my error in the code posted below.  The code is completely functional
doing everything I need, but there is a major memory leak.

When I try to track memory in the DDMS, the VM Heap tells me that my
object count is relatively stable and the used memory is also
relatively stable (it comes back down to a similar value after each GC
after panning).  When I look at the memory pie chart, the free memory
loses over 1meg of capacity with each map pan (overlay reload) and the
Unknown memory grows.  I have not found anything with the allocation
tracker.

Functional Summary:
I load overlays onto a map based on data I get from polling my
server.  When I pan the map far enough I clear the overlays and load
new ones.


MapFrontEnd.java  (snippets):
//header info
private List<Overlay> overlays;

//in onCreate
overlays = mapView.getOverlays();
...
// here I attempt to fully clean up my old Overlays
for (Overlay i : overlays)
{
     if (i instanceof ParcelOverlay)
         ((ParcelOverlay) i).cleanUp();
}
overlays.clear();

// and now I create the new overlays and add them to the Overlay list
int count = 0;
while (count < parcelData.length)
{
        try
        {
                overlays.add(new ParcelOverlay(MapFrontEnd.this, parcelData
[count]));
        }
...
count++;
}



ParcelOverlay.java (necessary snippets):

public class ParcelOverlay extends Overlay {

        private MapFrontEnd context;
        private Location location;
        private GeoPoint locationPoint;
        private int parcelSize;
        private int price;
        private String priceString;
        private String owner;
        private int buildingCount;
        private int haunted;
        private Bitmap buildingBitmap = null;
        private Bitmap ghostBitmap = null;
        private Bitmap presentBitmap = null;

        private boolean selected = false;

        private int backgroundColor;  // ARGB
        private int gridlineColor;
        private int selectedColor = 0xBBFAFA14;

        private Typeface face;

        // draw variables
        private GeoPoint sizePoint;
        private Paint rectOverlay = new Paint();
        private Paint rectGrid = new Paint();
        private Paint textPaint = new Paint();
        private Paint imagePaint = new Paint();
        Point topLeft = new Point();
        Point bottomRight = new Point();

        Point bottomLeft = new Point();
        Point topRight = new Point();

        public ParcelOverlay(MapFrontEnd _context, ParcelData _parcel) {
            super();
            context = _context;
            locationPoint = new GeoPoint(_parcel.latitude,
_parcel.longitude);
            parcelSize = _parcel.size;
            price = _parcel.cost;
            owner = _parcel.owner;
            buildingCount = _parcel.buildingNumber;
            haunted = _parcel.haunted;
            prize = _parcel.prize;
            priceString = Integer.toString(price);

            sizePoint = new GeoPoint(locationPoint.getLatitudeE6() +
parcelSize, locationPoint.getLongitudeE6() + parcelSize);

            face = Typeface.createFromAsset(context.getAssets(), "fonts/
sd_led_screen.ttf");

            setupColors();

                textPaint.setColor(0xd8000000);
                textPaint.setTextSize(25);
                textPaint.setTypeface(face);
        }

        @Override
        public void draw(Canvas canvas, MapView mapView, boolean shadow) {
               // there are no new objects created in draw
                if (shadow == false) {
                  ...
                  if (buildingBitmap != null)
                    canvas.drawBitmap(buildingBitmap, (float)(bottomLeft.x + 5),
(float)(topRight.y + 5), imagePaint);

                  if (ghostBitmap != null)
                        canvas.drawBitmap(ghostBitmap, (float)(topRight.x - 
30), (float)
(topRight.y + 3), imagePaint);

                  if (presentBitmap != null)
                        canvas.drawBitmap(presentBitmap, (float)(topRight.x - 
30),
(float)(bottomLeft.y - 16), imagePaint);
                  ...
                }
                super.draw(canvas, mapView, shadow);
           }

        private void setupColors()
        {
            ... //code for setting Paint colors

                // set the building bitmap
            if (buildingCount > 5)
                buildingBitmap = BitmapFactory.decodeResource
(context.getResources(), R.drawable.mainstreet);
            else if (buildingCount > 2)
                buildingBitmap = BitmapFactory.decodeResource
(context.getResources(), R.drawable.tradingpost);
            else if (buildingCount > 0)
                buildingBitmap = BitmapFactory.decodeResource
(context.getResources(), R.drawable.generalstore);
            else if (buildingCount == 0)
            {
                if (buildingBitmap != null)
                {
                        buildingBitmap.recycle();
                        buildingBitmap = null;
                }
            }
            else
                buildingBitmap = BitmapFactory.decodeResource
(context.getResources(), R.drawable.playerstore);

            if (haunted == 1)
                ghostBitmap = BitmapFactory.decodeResource(context.getResources
(), R.drawable.ghostsmall);
            else if (ghostBitmap != null)
            {
                ghostBitmap.recycle();
                ghostBitmap = null;
            }

            if (prize == 1)
                presentBitmap = 
BitmapFactory.decodeResource(context.getResources
(), R.drawable.present);
            else if (presentBitmap != null)
            {
                presentBitmap.recycle();
                presentBitmap = null;
            }
        }

        public void cleanUp()
        {
                context = null;

                if (buildingBitmap != null)
                {
                        buildingBitmap.recycle();
                        buildingBitmap = null;
                }
                if (ghostBitmap != null)
                {
                        ghostBitmap.recycle();
                        ghostBitmap = null;
                }
                if (presentBitmap != null)
                {
                        presentBitmap.recycle();
                        presentBitmap = null;
                }
        }

2. Process in Android

Hi,

I have an application which has one activity. The application is
launched. When i say back, OnDestory() would be called. This means
that the activity is being killed.

What will happen to the process? Will the process also be killed? But
when i use ps command i could see the process still running.

Will the process not be killed?
Can someone explain this in detail or provide from reference to get
information on the same.


Regards

3. Does Android Eclair code base support "Plugins" in "Android Browser"?

4. Android internal storage - what are the limits?

5. Diconnecting Phone Call Programatically

6. Nexus One - Stalled when downloading Apps from Market using Wi-Fi

7. Service operation