Skip to content

Instantly share code, notes, and snippets.

View M0nteCarl0's full-sized avatar
🐈
const mutable

Alex M0nteCarl0

🐈
const mutable
View GitHub Profile
@M0nteCarl0
M0nteCarl0 / Control_ST_L6258.c
Last active June 7, 2023 18:26
STM L6258 PWM controlled high current DMOS universal motor driver HAL module
#include "Control_ST_L6258.h"
/******************************************************************************
* @file Control_ST_L625.c
* @author Molotaliev A.O(molotaliev@xprom.ru)
* @version V 0.5.1
* @date 10-May-2016
* @brief This Driver for H-Bridge ST L6258(LGPL)
*
*
****************************************************************************/
@M0nteCarl0
M0nteCarl0 / GpioControler.cpp
Created January 23, 2023 09:28
STM32MP1 GpioControler HAL driver
/*
* GpioControler.cpp
*
* Created on: Sep 30, 2019
* Author: M0nteCarl0
*/
#include "GpioControler.h"
GpioControler::GpioControler():MaxCountBank(0),MaxCountLinesPerBank(0),Iter(nullptr),Chip(nullptr){
@M0nteCarl0
M0nteCarl0 / FM25.c
Created January 23, 2023 09:54
Driver for RAMTRON FM2504 F-RAM Memory
#include "FM25.h"
/******************************************************************************
* @file FM25.c
* @author Molotaliev A.O(molotaliev@xprom.ru)
* @version V 0.0.1
* @date 1-october-2016
* @brief This Driver for RAMTRON FM2504 F-RAM Memory
*
*
****************************************************************************/
@M0nteCarl0
M0nteCarl0 / DAC.c
Created January 23, 2023 09:57
MAX1932 8 bit DAC Driver
include "DAC.h"
/******************************************************************************/
void InitDAC(void)
{
RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2,ENABLE);
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOB,ENABLE);
RCC_AHB1PeriphClockCmd(CS_RCC,ENABLE);
GPIO_PinAFConfig(GPIOB, GPIO_PinSource15, GPIO_AF_SPI2);
@M0nteCarl0
M0nteCarl0 / CriticalSection.cpp
Created January 23, 2023 17:03
C++ File RAM Cache implentation for high speed detectors
#include "CriticalSection.h"
CriticalSection::CriticalSection() {
Init();
}
CriticalSection::CriticalSection(const char * Decription) {
Init();
_Description = Decription;
}
@M0nteCarl0
M0nteCarl0 / TraceView.py
Created May 4, 2023 13:19
TraceView via IDA Pro
import sys
import time
import numpy as np
from matplotlib.backends.qt_compat import QtWidgets
from matplotlib.backends.backend_qtagg import (
FigureCanvas, NavigationToolbar2QT as NavigationToolbar)
from matplotlib.figure import Figure
import trsfile as trs
from trsfile import trs_open, Trace, SampleCoding, TracePadding, Header
@M0nteCarl0
M0nteCarl0 / README.md
Last active July 21, 2023 09:12
IPC plugin system on Golang

IPC plugin system on Golang

Here's an example of how you can implement a multi-process plugin system for Linux on Golang

Structure of files and folders

Sources structure

  • core_module.go - Core module of plugin system.
  • process_plugin.go - Plugin module.
  • watchdog.go - Watchdog module.

Folders structure

@M0nteCarl0
M0nteCarl0 / beast_http.cpp
Created July 24, 2023 06:39
Boost,beast HTTP client
#include <iostream>
#include <boost/asio.hpp>
#include <boost/beast.hpp>
namespace asio = boost::asio;
namespace beast = boost::beast;
using tcp = asio::ip::tcp;
int main()
{
@M0nteCarl0
M0nteCarl0 / wins_push_raw_send.cpp
Created July 24, 2023 07:49
Wins push notification client
#include <iostream>
#include <cpprest/http_client.h>
#include <cpprest/json.h>
using namespace web;
using namespace web::http;
using namespace web::http::client;
int main()
{
@M0nteCarl0
M0nteCarl0 / asio_tcp_server.cpp
Created July 24, 2023 07:52
Boost.asio multi thread TCP server
#include <iostream>
#include <boost/asio.hpp>
#include <boost/thread.hpp>
using boost::asio::ip::tcp;
void session(tcp::socket socket)
{
try
{