Skip to content

Instantly share code, notes, and snippets.

View doofy-dev's full-sized avatar

Tibor Tálosi doofy-dev

  • Hungary
View GitHub Profile
@doofy-dev
doofy-dev / led_sample.c
Created November 20, 2022 17:12
Sample led usage
#include <furi.h>
#include <notification/notification.h>
#include <notification/notification_messages.h>
const NotificationSequence enable_all_colors = {
&message_red_255,
&message_green_255,
&message_blue_255,
NULL,
};
@doofy-dev
doofy-dev / flipper_pixels.c
Created November 14, 2022 13:11
Read and write pixels for Flipper zero
typedef enum {
Black,
White,
Inverse
} DrawMode;
unsigned flipBit(uint8_t x, uint8_t bit) {
return x ^ (1 << bit);
}
function getParam(param){
var params = location.href.match(/(\w+)=(\d+)/g);
for(var i=0;i<params.length;i++){
var split = params[i].split('=');
if(split[0]==param)
return split[1];
}
return null;
}