This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void read_sensor_data(hal::i2c& p_device) | |
{ | |
hal::byte status = 0; | |
do { | |
status = hal::write_then_read<1>(p_device, | |
0x11, | |
std::to_array<hal::byte>({ 0xAA }), | |
hal::never_timeout())[0]; | |
} while (status & (1 << 5)); // but the sensor is dead 😱 !!! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2024 Khalil Estell | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check if enough arguments are passed | |
if [ "$#" -lt 3 ]; then | |
echo "Usage: $0 <file_with_repo_urls> <path_to_script> <'commit_message'>" | |
exit 1 | |
fi | |
REPO_FILE=$1 | |
SCRIPT_PATH=$2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Start the .clangd file afresh | |
echo "" > .clangd | |
# Get the absolute path to the script's directory | |
root_dir=$(pwd) | |
# Iterate over all directories in the current directory | |
for dir in */ ; do |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="modal__header"> | |
<h3 class="title"></h3> | |
</div> | |
<div class="modal__body eula-content no-footer"><p>Contains code from project GNU Binutils (https://www.gnu.org/software/binutils/),<br> | |
GNU Debugger (https://www.gnu.org/software/gdb/) under the following license(s).<br> | |
<br> | |
<br> | |
GNU GENERAL PUBLIC LICENSE<br> | |
Version 3, 29 June 2007<br> | |
<br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"schemaVersion": 1, | |
"label": "", | |
"logoSvg": "<svg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 310.797 310.797' style='enable-background:new 0 0 310.797 310.797;' xml:space='preserve'><g><path d='M208.859,27.307L208.8,11.308L189.311,0l-87.893,51.407l0.11,19.635L63.697,93.104l0.073,47.457l-18.592,11.161 l-0.155,101.334l20.214,11.833l12.422-7.502l18.173,11.395v30.12l20.075,11.895l87.333-50.921l-0.053-21.302l45.583-26.463v-38.133 l17.004-10.152V60.551L208.859,27.307z M187.302,33.392l6.559-3.846l0.048,23.674l-6.607,3.86V33.392z M158.816,50.059l6.558-3.836 l0.049,23.653l-6.606,3.86V50.059z M129.173,67.389l6.558-3.844l0.049,23.68l-6.606,3.871V67.389z M101.529,87.725l-0.049,13.891 l20.164,11.813l87.158-51.046l0.095-17.363l23.033,14.225l-107.389,63.021L83.517,98.361L101.529,87.725z M73.18,167.153 l20.375-12.225l-0.105,7.768l-20.383,12.171L73.18,167.153z M72.604,203.263l0.018-1.205l20.374-12.225l-0.105,7.768l-20.382,12.17 L |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cinttypes> | |
#include <cstdio> | |
#include <functional> | |
namespace embed { | |
/// An empty settings structure used to indicate that a module or interface does | |
/// not have generic settings. | |
struct empty_settings {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bitset> | |
#include <cinttypes> | |
#include <cstdio> | |
#include <limits> | |
#include <type_traits> | |
namespace xstd { | |
struct bitrange { | |
uint32_t position; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bitset> | |
#include <cinttypes> | |
#include <cstdio> | |
#include <limits> | |
#include <type_traits> | |
namespace xstd { | |
struct bitrange { | |
uint32_t position; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct _reent r = {0, (FILE *) 0, (FILE *) 1, (FILE *) 0}; | |
struct _reent *_impure_ptr = &r; | |
extern "C" void __cxa_pure_virtual() | |
{ | |
// put your error handling here | |
} | |
extern "C" void __cxa_atexit() {} |
NewerOlder