1/* 2 * Beceem WiMax USB Driver 3 * Copyright 2010-2011 Haiku, Inc. All rights reserved. 4 * Distributed under the terms of the MIT license. 5 * 6 * Authors: 7 * Alexander von Gluck, <kallisti5@unixzen.com> 8 */ 9#ifndef _USB_BECEEM_LED_H_ 10#define _USB_BECEEM_LED_H_ 11 12 13#include <ByteOrder.h> 14#include "DeviceStruct.h" 15 16 17class BeceemLED 18{ 19public: 20 BeceemLED(); 21 status_t LEDInit(WIMAX_DEVICE* wmxdevice); 22 status_t LEDThreadTerminate(); 23 status_t LEDOff(uint32 index); 24 status_t LEDOn(uint32 index); 25 status_t LightsOut(); 26 static status_t LEDThread(void *cookie); 27 28 WIMAX_DEVICE* pwmxdevice; 29 30 // yuck. These are in a parent class 31 virtual status_t ReadRegister(uint32 reg, 32 size_t size, uint32* buffer) 33 { return NULL; }; 34 virtual status_t WriteRegister(uint32 reg, 35 size_t size, uint32* buffer) 36 { return NULL; }; 37 virtual status_t BizarroReadRegister(uint32 reg, 38 size_t size, uint32* buffer) 39 { return NULL; }; 40 virtual status_t BizarroWriteRegister(uint32 reg, 41 size_t size, uint32* buffer) 42 { return NULL; }; 43 44private: 45 status_t GPIOReset(); 46 47}; 48 49 50typedef enum _LEDColors{ 51 RED_LED = 1, 52 BLUE_LED = 2, 53 YELLOW_LED = 3, 54 GREEN_LED = 4 55} LEDColors; 56 57 58#endif // _USB_BECEEM_LED_H 59 60