#ifndef LED_H_INCLUDED
#define LED_H_INCLUDED

#include <stdint.h>

#include "kernel.h"

// Player LED: tells a pad which player it is, so it stops showing its
// "searching" display. See doc.Rumble.

// Joystick_Cap_LED if the slot's driver can set the LED and its transport exists.
uint32_t led_capabilities(uint32_t slot);

// Xbox 360 wireless receiver. The packet hook (joy_packet_fn) notices a pad
// connecting and arranges for the LED to be sent a few times; the builder
// (joy_led_fn) sends the slot's player LED.
void led_xbox360wireless_packet(uint32_t slot, const uint8_t *data, uint32_t len, int input);
_kernel_oserror *led_xbox360wireless(uint32_t slot);

// Module dying: cancel the send callback.
void led_shutdown(void);

// Sends the LEDs that are due (CMHG generic veneer).
_kernel_oserror *led_callback_handler(_kernel_swi_regs *r, void *pw);

#endif
