GY-63_MS5611/libraries/Currency/currency.h

60 lines
1.3 KiB
C
Raw Normal View History

2021-03-01 04:11:54 -05:00
#pragma once
//
// FILE: currency.h
// AUTHOR: Rob Tillaart
2022-10-30 15:44:02 -04:00
// VERSION: 0.1.7
2021-03-01 04:11:54 -05:00
// PURPOSE: Currency library for Arduino
// URL: https://github.com/RobTillaart/Currency
#include "Arduino.h"
2022-10-30 15:44:02 -04:00
#define CURRENCY_VERSION (F("0.1.7"))
2021-03-01 04:11:54 -05:00
2022-10-30 15:44:02 -04:00
// TODO
// optimize this 99% same code currency - currency64
// print to string and "merge" with formatters?
//
// ALT-0165 = ¥
// ALT-0128 = €
// U+20BF = Bitcoin
2021-03-01 04:11:54 -05:00
2022-04-15 08:48:42 -04:00
char * currency(int32_t value, int decimals, char decimalSeparator, char thousandSeparator, char symbol);
2021-03-01 04:11:54 -05:00
2022-04-15 08:48:42 -04:00
char * currency64(int64_t value, int decimals, char decimalSeparator, char thousandSeparator, char symbol);
2021-03-01 04:11:54 -05:00
//
// DERIVED FUNCTIONS
//
2022-04-15 08:48:42 -04:00
char * bitcoin(int32_t value);
char * dollar(int32_t value);
char * euro(int32_t value);
char * pound(int32_t value);
char * roubles(int32_t value);
char * yen(int32_t value);
char * yuan(int32_t value);
char * bitcoin64(int64_t value);
char * dollar64(int64_t value);
char * euro64(int64_t value);
char * pound64(int64_t value);
char * roubles64(int64_t value);
char * yen64(int64_t value);
char * yuan64(int64_t value);
char * bitcoinf(double value);
char * dollarf(double value);
char * eurof(double value);
char * poundf(double value);
char * roublesf(double value);
char * yenf(double value);
char * yuanf(double value);
2021-03-01 04:11:54 -05:00
// -- END OF FILE --
2022-10-30 15:44:02 -04:00