Some improvements to readme and added blisp_dlog

This commit is contained in:
Marek Kraus 2023-01-07 15:07:25 +01:00
parent 8a00a63600
commit 841a52177b
2 changed files with 12 additions and 10 deletions

View File

@ -12,9 +12,6 @@ Open source tool and library for flashing Bouffalo RISC-V MCUs.
- [ ] `bl61x` - BL616 / BL618 - [ ] `bl61x` - BL616 / BL618
- [ ] `bl808` - BL808 - [ ] `bl808` - BL808
# Supported Devices
- [X] [Pinecil V2](https://wiki.pine64.org/wiki/Pinecil)
# Supported OS # Supported OS
- [x] Windows - [x] Windows
- [x] Linux - [x] Linux
@ -58,10 +55,3 @@ blisp --chip bl60x --reset -p /dev/ttyUSB0 name_of_firmware.bin
# How to flash Pinecil V2 # How to flash Pinecil V2
Check out the [wiki page](https://github.com/pine64/blisp/wiki/Update-Pinecil-V2). Check out the [wiki page](https://github.com/pine64/blisp/wiki/Update-Pinecil-V2).
# To Do
- [ ] Another code style
- [ ] Finalize API
- [ ] SDIO and JTAG support
- [ ] Add Apple support

View File

@ -2,12 +2,24 @@
#ifndef _BLISP_UTIL_H #ifndef _BLISP_UTIL_H
#define _BLISP_UTIL_H #define _BLISP_UTIL_H
#include <stdarg.h>
#include <stdio.h>
#ifdef WIN32 #ifdef WIN32
#include <windows.h> #include <windows.h>
#else #else
#include <time.h> #include <time.h>
#endif #endif
static void blisp_dlog(const char* format, ...)
{
fflush(stdout);
va_list args;
va_start(args, format);
vfprintf(stderr, format, args);
va_end(args);
}
static void sleep_ms(int milliseconds) { static void sleep_ms(int milliseconds) {
#ifdef WIN32 #ifdef WIN32
Sleep(milliseconds); Sleep(milliseconds);