Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
Loading items

Target

Select target project
  • flow3r/flow3r-firmware
  • Vespasian/flow3r-firmware
  • alxndr42/flow3r-firmware
  • pl/flow3r-firmware
  • Kari/flow3r-firmware
  • raimue/flow3r-firmware
  • grandchild/flow3r-firmware
  • mu5tach3/flow3r-firmware
  • Nervengift/flow3r-firmware
  • arachnist/flow3r-firmware
  • TheNewCivilian/flow3r-firmware
  • alibi/flow3r-firmware
  • manuel_v/flow3r-firmware
  • xeniter/flow3r-firmware
  • maxbachmann/flow3r-firmware
  • yGifoom/flow3r-firmware
  • istobic/flow3r-firmware
  • EiNSTeiN_/flow3r-firmware
  • gnudalf/flow3r-firmware
  • 999eagle/flow3r-firmware
  • toerb/flow3r-firmware
  • pandark/flow3r-firmware
  • teal/flow3r-firmware
  • x42/flow3r-firmware
  • alufers/flow3r-firmware
  • dos/flow3r-firmware
  • yrlf/flow3r-firmware
  • LuKaRo/flow3r-firmware
  • ThomasElRubio/flow3r-firmware
  • ai/flow3r-firmware
  • T_X/flow3r-firmware
  • highTower/flow3r-firmware
  • beanieboi/flow3r-firmware
  • Woazboat/flow3r-firmware
  • gooniesbro/flow3r-firmware
  • marvino/flow3r-firmware
  • kressnerd/flow3r-firmware
  • quazgar/flow3r-firmware
  • aoid/flow3r-firmware
  • jkj/flow3r-firmware
  • naomi/flow3r-firmware
41 results
Select Git revision
Loading items
Show changes
Showing
with 54180 additions and 29 deletions
Copyright 2011 The Questrial Project Authors (https://github.com/googlefonts/questrial)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
idf_component_register(SRCS "led_strip_rmt_ws2812.c"
INCLUDE_DIRS "include"
PRIV_REQUIRES "driver"
)
# LED Strip Component
This directory contains an implementation for addressable LEDs using the RMT peripheral.
It's compatible with:
* [WS2812](http://www.world-semi.com/Certifications/WS2812B.html)
* SK68XX
This component is used as part of the following ESP-IDF examples:
- [Blink Example](../../get-started/blink).
- [LED Strip Example](../../peripherals/rmt/led_strip).
To learn more about how to use this component, please check API Documentation from header file [led_strip.h](./include/led_strip.h).
Please note that this component is not considered to be a part of ESP-IDF stable API. It may change and it may be removed in the future releases.
version: "1.1.0-alpha"
description: C driver, based on RMT peripheral, for WS2812 and SK6812 smart RGB diodes
dependencies:
# Required IDF version
idf:
version: ">=4.0"
idf_component_register( idf_component_register(
SRCS SRCS
flow3r_bsp_audio.c
flow3r_bsp_imu.c
flow3r_bsp_display.c flow3r_bsp_display.c
flow3r_bsp_gc9a01.c flow3r_bsp_gc9a01.c
flow3r_bsp_hwconfig.c flow3r_bsp_hwconfig.c
flow3r_bsp_i2c.c
flow3r_bsp_max7321.c
flow3r_bsp_max98091.c
flow3r_bsp_leds.c
flow3r_bsp_rmtled.c
flow3r_bsp_spio.c
flow3r_bsp_captouch.c
flow3r_bsp_ad7147.c
flow3r_bsp_ad7147_hw.c
INCLUDE_DIRS INCLUDE_DIRS
. .
REQUIRES
driver
vfs
bmi270
bmp581
esp_timer
) )
menu "Badge23 Config" menu "Flow3r Config"
choice BADGE23_HW_GEN choice FLOW3R_HW_GEN
prompt "Badge23 Hardware Generation" prompt "Badge23 Hardware Generation"
default BADGE23_HW_GEN_P4 default FLOW3R_HW_GEN_C23
config BADGE23_HW_GEN_P1 config FLOW3R_HW_GEN_P3
help
Protoype version 1, a.k.a. proto1. Very early protoype.
Visual identifiers:
- No line in/out jacks
- White bottom board
- USB-C jack points side of leaf
bool "Prototype 1"
config BADGE23_HW_GEN_P3
help help
Prototype version 3, a.k.a. proto3 Prototype version 3, a.k.a. proto3
Visual identifiers: Visual identifiers:
- Sticker with B3xx (xx being arbitrary digits) on the back - Sticker with B3xx (xx being arbitrary digits) on the back
select FLOW3R_ESP32S3
bool "Prototype 3" bool "Prototype 3"
config BADGE23_HW_GEN_P4 config FLOW3R_HW_GEN_P4
help help
Prototype version 4, a.k.a. proto4 Prototype version 4, a.k.a. proto4
Visual identifiers: Visual identifiers:
- Sticker with B4xx (xx being arbitrary digits) on the back - Sticker with B4xx (xx being arbitrary digits) on the back
select FLOW3R_ESP32S3
bool "Prototype 4" bool "Prototype 4"
config BADGE23_HW_GEN_ADILESS config FLOW3R_HW_GEN_C23
help
Prototype version 5, a.k.a. adi-less
Visual identifiers:
- Sticker with B5xx (xx being arbitrary digits) on the back
bool "Prototype 5 / ADI-less"
config BADGE23_HW_GEN_P6
help help
Prototype version 6, a.k.a. proto6 As seen on CCCamp 2023.
- Sticker with B6xx (xx being arbitrary digits) on the back Previously known as prototype version 6, a.k.a. proto6.
bool "Prototype 5 / ADI-less" select FLOW3R_ESP32S3
bool "CCCamp 2023"
endchoice endchoice
config FLOW3R_ESP32S3
bool
endmenu endmenu
#pragma once #pragma once
#include "flow3r_bsp_i2c.h"
#include <stdint.h> #include <stdint.h>
// Initialize badge display. An error will be reported if the initialization // Initialize badge display. An error will be reported if the initialization
...@@ -21,7 +23,11 @@ void flow3r_bsp_display_init(void); ...@@ -21,7 +23,11 @@ void flow3r_bsp_display_init(void);
// This must not be called if another transfer is alraedy being performed. The // This must not be called if another transfer is alraedy being performed. The
// user code should sequence access and make sure not more than one transfer is // user code should sequence access and make sure not more than one transfer is
// performed simultaneously. // performed simultaneously.
void flow3r_bsp_display_send_fb(uint16_t *fb_data); void flow3r_bsp_display_send_fb(void *fb_data, int bits);
void flow3r_bsp_display_send_fb_osd(void *fb_data, int bits, int scale,
void *osd_data, int osd_x0, int osd_y0,
int osd_x1, int osd_y1);
// Set display backlight, as integer percent value (from 0 to 100, clamped). // Set display backlight, as integer percent value (from 0 to 100, clamped).
// No-op if display hasn't been succesfully initialized. // No-op if display hasn't been succesfully initialized.
...@@ -32,4 +38,188 @@ void flow3r_bsp_display_set_backlight(uint8_t percent); ...@@ -32,4 +38,188 @@ void flow3r_bsp_display_set_backlight(uint8_t percent);
#define FLOW3R_BSP_DISPLAY_HEIGHT 240 #define FLOW3R_BSP_DISPLAY_HEIGHT 240
// Badge hardware generation name, human-readable. // Badge hardware generation name, human-readable.
const char *flow3r_bsp_hw_name; extern const char *flow3r_bsp_hw_name;
\ No newline at end of file
#define FLOW3R_BSP_AUDIO_SAMPLE_RATE 48000
#define FLOW3R_BSP_AUDIO_DMA_BUFFER_SIZE 64
#define FLOW3R_BSP_AUDIO_DMA_BUFFER_COUNT 4
typedef enum {
flow3r_bsp_audio_input_source_none = 0,
// Line in on riht jack.
flow3r_bsp_audio_input_source_line_in = 1,
// Headset microphone on left jack.
flow3r_bsp_audio_input_source_headset_mic = 2,
// Onboard microphone (enabled red LED).
flow3r_bsp_audio_input_source_onboard_mic = 3,
} flow3r_bsp_audio_input_source_t;
// Initialize the audio subsystem of the badge, including the codec and I2S data
// channel.
void flow3r_bsp_audio_init(void);
// Attempts to set target volume for the headphone output/onboard speakers
// respectively, clamps/rounds if necessary and returns the actual volume
// applied in hardware.
//
// Absolute reference arbitrary.
//
// Returns value actually applied in hardware, which might be significantly off
// from the requested volume. The caller must perform fine audio volume adjust
// in software.
float flow3r_bsp_audio_headphones_set_volume(bool mute, float dB);
float flow3r_bsp_audio_speaker_set_volume(bool mute, float dB);
// Hardware preamp gain, 0dB-50dB.
//
// TODO: figure out if int/float inconsistency is a good thing here compared to
// all other _dB functions.
int8_t flow3r_bsp_audio_headset_set_gain_dB(int8_t gain_dB);
typedef struct {
bool headphones;
bool headset;
bool line_in;
} flow3r_bsp_audio_jacksense_state_t;
// Polls hardware to check if headphones, headset or line in are plugged into
// the 3.5mm jacks. The result is saved into `st`, which must be non-NULL.
void flow3r_bsp_audio_read_jacksense(flow3r_bsp_audio_jacksense_state_t *st);
// The codec can transmit audio data from different sources. This function
// enables one or no source as provided by the flow3r_bsp_audio_input_source_t
// enum.
//
// Note: The onboard digital mic turns on an LED on the top board if it receives
// a clock signal which is considered a good proxy for its capability of reading
// data.
//
// TODO: check if sources are available
void flow3r_bsp_audio_input_set_source(flow3r_bsp_audio_input_source_t source);
// These route whatever is on the line in port directly to the headphones or
// speaker respectively (enable = 1), or don't (enable = 0). Is affected by mute
// and coarse hardware volume settings, however software fine volume is not
// applied.
//
// Good for testing, might deprecate later, idk~
void flow3r_bsp_audio_headphones_line_in_set_hardware_thru(bool enable);
void flow3r_bsp_audio_speaker_line_in_set_hardware_thru(bool enable);
void flow3r_bsp_audio_line_in_set_hardware_thru(bool enable);
// Returns true if the flow3r_bsp_audio_*_set_volume mute argument is being
// interpreted. If false, the user should perform muting in software.
//
// NOTE: this is only 'false' on very early hardware (P1). If you're
// implementing something for badges available at camp, assume this always
// returns true.
bool flow3r_bsp_audio_has_hardware_mute(void);
// Read or write I2S audio data from/to the codec.
//
// The output is sent to the speakers and/or headphones, depending on
// speaker/headphone volume/muting.
//
// The input is routed according to the configured source (via
// flow3r_bp_audio_input_set_source).
esp_err_t flow3r_bsp_audio_read(void *dest, size_t size, size_t *bytes_read,
TickType_t ticks_to_wait);
esp_err_t flow3r_bsp_audio_write(const void *src, size_t size,
size_t *bytes_written,
TickType_t ticks_to_wait);
// Write audio codec register. Obviously very unsafe. Have fun.
void flow3r_bsp_audio_register_poke(uint8_t reg, uint8_t data);
// Configure audio codec DRC. For testing purposes, not stable api.
void flow3r_bsp_max98091_configure_dynamic_range_control(
bool enable, uint8_t attack, uint8_t release, uint8_t make_up_gain_dB,
uint8_t comp_ratio, uint8_t comp_threshold_dB, uint8_t exp_ratio,
uint8_t exp_threshold_dB);
#define FLOW3R_BSP_LED_COUNT 40
// Initialize LEDs.
esp_err_t flow3r_bsp_leds_init(void);
// Set internal buffer for given LED to an RGB value.
//
// Index is a value in [0, FLOW3R_BSP_LED_COUNT).
//
// RGB values are in [0, 0xff].
void flow3r_bsp_leds_set_pixel(uint32_t index, uint32_t red, uint32_t green,
uint32_t blue);
// Transmit from internal buffer into LEDs. This will block in case there
// already is a previous transmission happening.
esp_err_t flow3r_bsp_leds_refresh(TickType_t timeout_ms);
// A 'tripos' button is what we're calling the shoulder buttons. As the name
// indicates, it has three positions: left, middle (a.k.a. down/press) and
// right.
typedef enum {
// Not pressed.
flow3r_bsp_tripos_none = 0,
// Pressed towards the left.
flow3r_bsp_tripos_left = -1,
// Pressed down.
flow3r_bsp_tripos_mid = 2,
// Pressed towards the right.
flow3r_bsp_tripos_right = 1,
} flow3r_bsp_tripos_state_t;
// Initialize 'special purpose i/o', which is like gpio, but more :). This means
// effectively all the buttons and on-board detect/enable signals.
esp_err_t flow3r_bsp_spio_init(void);
// Refresh the state of I/O: update outputs based on last called _set functions,
// and make _get return the newest hardware state.
esp_err_t flow3r_bsp_spio_update(void);
// Return the latest updated position of the left shoulder/tripos button.
//
// flow3r_bsp_spio_update must be called for this data to be up to date.
flow3r_bsp_tripos_state_t flow3r_bsp_spio_left_button_get(void);
// Return the latest updated position of the right shoulder/tripos button.
//
// flow3r_bsp_spio_update must be called for this data to be up to date.
flow3r_bsp_tripos_state_t flow3r_bsp_spio_right_button_get(void);
// Returns true if the device is charging.
//
// flow3r_bsp_spio_update must be called for this data to be up to date.
bool flow3r_bsp_spio_charger_state_get(void);
// Returns true if the device has something plugged into the right 3.5mm jack.
//
// flow3r_bsp_spio_update must be called for this data to be up to date.
bool flow3r_bsp_spio_jacksense_right_get(void);
// Switch tip/ring muxes to 'badgelink' digital I/O data pins on the left hand
// jack. As this is the same as the headphone jack, please observe caution when
// enabling this! See the comment at the bottom of st3m_audio.h.
//
// flow3r_bsp_spio_update must be called for this setting to actually propagate
// to hardware.
void flow3r_bsp_spio_badgelink_left_enable(bool tip_on, bool ring_on);
// Switch tip/ring muxes to 'badgelink' digital I/O data pins on the right hand
// jack.
//
// flow3r_bsp_spio_update must be called for this setting to actually propagate
// to hardware.
void flow3r_bsp_spio_badgelink_right_enable(bool tip_on, bool ring_on);
// Pin mapping information of programmable badge I/O. These are GPIO numbers
// that can be used with the ESP-IDF API.
typedef struct {
// Left jack, headphone/line out.
uint8_t badgelink_left_tip;
uint8_t badgelink_left_ring;
// Right jack, line in.
uint8_t badgelink_right_tip;
uint8_t badgelink_right_ring;
} flow3r_bsp_spio_programmable_pins_t;
extern const flow3r_bsp_spio_programmable_pins_t
flow3r_bsp_spio_programmable_pins;