circuitpython/atmel-samd/rgb_led_status.h
Scott Shawcroft 4a4f29b8f9 atmel-samd: Rework status LED implementation
* Track status pin use by user code separately so it can take over the pins and then give them back.
* Switch to hardware SPI for APA102 on Gemma and Trinket.
* Merge microcontroller/types.h into microcontroller/Pin.h to better match approach going forwards.
2017-04-12 15:24:50 -07:00

24 lines
685 B
C

#ifndef __MICROPY_INCLUDED_ATMEL_SAMD_RGB_LED_STATUS_H
#define __MICROPY_INCLUDED_ATMEL_SAMD_RGB_LED_STATUS_H
#include <stdint.h>
#include <stdbool.h>
#include "mpconfigport.h"
#include "rgb_led_colors.h"
#if defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK) && !defined(CIRCUITPY_BITBANG_APA102)
#include "common-hal/busio/SPI.h"
extern busio_spi_obj_t status_apa102;
#endif
void rgb_led_status_init(void);
void reset_status_led(void);
void new_status_color(uint32_t rgb);
void temp_status_color(uint32_t rgb);
void clear_temp_status(void);
uint32_t color_brightness(uint32_t color, uint8_t brightness);
#endif // __MICROPY_INCLUDED_ATMEL_SAMD_RGB_LED_STATUS_H