Author: wmb Date: 2007-09-18 01:37:47 +0200 (Tue, 18 Sep 2007) New Revision: 613
Modified: dev/usb2/device/wlan/usb8388.fth Log: USB Wlan driver - Added support for disconnect-while-host-is-sleeping.
Modified: dev/usb2/device/wlan/usb8388.fth =================================================================== --- dev/usb2/device/wlan/usb8388.fth 2007-09-17 23:34:55 UTC (rev 612) +++ dev/usb2/device/wlan/usb8388.fth 2007-09-17 23:37:47 UTC (rev 613) @@ -1105,7 +1105,49 @@ wait-cmd-resp if exit then ;
+2 constant gpio-pin +d# 20 constant wake-gap +1 constant wake-on-broadcast +2 constant wake-on-unicast +4 constant wake-on-mac-event +-1 constant remove-wakeup
+\ LED_GPIO_CTRL + +: host-sleep-activate ( -- ) + 0 h# 45 ( CMD_802_11_HOST_SLEEP_ACTIVATE ) prepare-cmd + 0 outbuf-bulk-out if exit then + wait-cmd-resp if exit then +; + +: host-sleep-config ( conditions -- ) + >r + 6 h# 43 ( CMD_802_11_HOST_SLEEP_CFG ) prepare-cmd +\ ACTION_SET +xw + + r> +xl + gpio-pin +xb + wake-gap +xb + + 6 outbuf-bulk-out if exit then + wait-cmd-resp if exit then +; + +: unicast-wakeup ( -- ) wake-on-unicast host-sleep-config ; +: broadcast-wakeup ( -- ) wake-on-unicast wake-on-broadcast or host-sleep-config ; +: sleep ( -- ) host-sleep-activate ; + +[ifdef] notdef \ This is test code that only works with a special debug version of the Libertas firmware +: autostart ( -- ) + h# 82 h# 9b ( CMD_MESH_ACCESS ) prepare-cmd + 5 +xw \ CMD_ACT_SET_ANYCAST + h# 700000 +xl + + h# 82 outbuf-bulk-out if exit then + wait-cmd-resp if exit then +; +[then] + \ LICENSE_BEGIN \ Copyright (c) 2007 FirmWorks \