mirror of
https://github.com/siemens-mobile-hacks/sdk.git
synced 2026-11-25 22:27:39 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
2cf1bce08c
30 changed files with 1404 additions and 635 deletions
40
.github/workflows/release.yml
vendored
Normal file
40
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
name: Release packages
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: Release tag to build and upload .epk packages for
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
epk:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.release.tag_name || inputs.tag }}
|
||||
env:
|
||||
TAG: ${{ github.event.release.tag_name || inputs.tag }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: refs/tags/${{ env.TAG }}
|
||||
|
||||
- name: Install toolchain
|
||||
uses: carlosperate/arm-none-eabi-gcc-action@v1
|
||||
with:
|
||||
release: 14.2.Rel1
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake -B build
|
||||
cmake --build build -j"$(nproc)"
|
||||
|
||||
- name: Upload packages
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: gh release upload "$TAG" build/*.epk --clobber
|
||||
|
|
@ -357,7 +357,7 @@ function(epk_package)
|
|||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${_EPK_PKGINFO}" "${_EPK_STAGE_DIR}/.PKGINFO"
|
||||
${_EPK_COMMANDS}
|
||||
COMMAND "${CMAKE_COMMAND}" -E chdir "${_EPK_STAGE_DIR}"
|
||||
"${CMAKE_COMMAND}" -E tar cf "${_EPK_OUTPUT}" --format=zip --mtime=@1172750400 .
|
||||
"${CMAKE_COMMAND}" -E tar cf "${_EPK_OUTPUT}" --format=zip "--mtime=2007-03-01 12:00:00 UTC" .
|
||||
DEPENDS
|
||||
"${CMAKE_CURRENT_FUNCTION_LIST_FILE}"
|
||||
"${_EPK_PKGINFO}"
|
||||
|
|
|
|||
|
|
@ -111,8 +111,6 @@ pairs = [
|
|||
[0x12E, 0x03F], # GetPaletteAdrByColorIndex
|
||||
[0x13B, 0x064], # GeneralFuncF1
|
||||
[0x364, 0x1F3], # NU_Retrieve_Clock
|
||||
[0x365, 0x366], # NU_Release_Information
|
||||
[0x254, 0x22E], # StartNativeExplorer
|
||||
[0x14B, 0x077], # DrwObj_SetColor
|
||||
[0x1B4, 0x09F], # DrawRectangle
|
||||
[0x1AB, 0x1D6, 0x1AD], # png_set_palette_to_rgb
|
||||
|
|
|
|||
|
|
@ -111,8 +111,8 @@ struct NativeAbData {
|
|||
};
|
||||
|
||||
/**
|
||||
* Open native adressbook.
|
||||
* @param type type of AdressBook UI
|
||||
* Open native address book.
|
||||
* @param type type of address-book UI
|
||||
* @param unk1 unknown
|
||||
* @param unk2 unknown
|
||||
* @param data pointer to the #NativeAbData or NULL
|
||||
|
|
@ -181,24 +181,24 @@ __swi_end(0x2B5, GetNativeAbDataType, (data, index));
|
|||
/**
|
||||
* Get number from the #NativeAbData
|
||||
* @param data pointer to the native addressbook data
|
||||
* @param type usually result of the `GetNativeAbDataType(data, 0)`
|
||||
* @param unk0 set to 0
|
||||
* @return 1: success, 0: error
|
||||
* @param type item type
|
||||
* @param index zero-based item index
|
||||
* @return newly allocated string, or NULL if the item was not found; free with #FreeWS
|
||||
* */
|
||||
__swi_begin(0x2B6)
|
||||
WSHDR *GetNumFromNativeAbData(NativeAbData *data, int type, int unk0)
|
||||
__swi_end(0x2B6, GetNumFromNativeAbData, (data, type, unk0));
|
||||
WSHDR *GetNumFromNativeAbData(NativeAbData *data, int type, int index)
|
||||
__swi_end(0x2B6, GetNumFromNativeAbData, (data, type, index));
|
||||
|
||||
/**
|
||||
* Set number to the #NativeAbData
|
||||
* @param data pointer to the native addressbook data
|
||||
* @param unk set to 0x1D
|
||||
* @param type item type
|
||||
* @param num phone number
|
||||
* @return 1: success, 0: error
|
||||
* */
|
||||
__swi_begin(0x2B8)
|
||||
int SetNumToNativeAbData(NativeAbData *data, int unk, const WSHDR *num)
|
||||
__swi_end(0x2B8, SetNumToNativeAbData, (data, unk, num));
|
||||
int SetNumToNativeAbData(NativeAbData *data, int type, const WSHDR *num)
|
||||
__swi_end(0x2B8, SetNumToNativeAbData, (data, type, num));
|
||||
|
||||
/**
|
||||
* Decode #PKT_NUM for the phone number.
|
||||
|
|
@ -238,7 +238,7 @@ int FreeUnpackABentry(AB_UNPRES *entry, void *mfree_fn)
|
|||
__swi_end(0x16E, FreeUnpackABentry, (entry, mfree_fn));
|
||||
|
||||
/**
|
||||
* Convert AB_UNPRESS.item_type to the NativeAbData item type.
|
||||
* Convert AB_UNPRES.item_type to the NativeAbData item type.
|
||||
* @param item_type input type
|
||||
* @return converted type
|
||||
* */
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@
|
|||
|
||||
#define __swi_noreturn_begin(number) __swi_begin
|
||||
#define __swi_noreturn_end(number, func, call) __swi_end(number, func)
|
||||
#define __swi_returns_twice_begin(number) __swi_begin
|
||||
#define __swi_returns_twice_end(number, func, call) __swi_end(number, func)
|
||||
|
||||
#define __swi_variadic_begin(number) __swi_begin
|
||||
#define __swi_variadic_end(number, func, ...) __swi_end(number, func)
|
||||
|
|
@ -32,6 +34,8 @@
|
|||
|
||||
#define __swi_noreturn_begin(number)
|
||||
#define __swi_noreturn_end(number, func, call)
|
||||
#define __swi_returns_twice_begin(number)
|
||||
#define __swi_returns_twice_end(number, func, call)
|
||||
|
||||
#define __swi_variadic_begin(number)
|
||||
#define __swi_variadic_end(number, func, ...)
|
||||
|
|
|
|||
|
|
@ -41,9 +41,14 @@ extern const int __sys_switab_addres[];
|
|||
#define __swi_noreturn_end(number, func, call) \
|
||||
__asm__(__swi_import_name(number)) __attribute__((weak, noreturn))
|
||||
|
||||
#define __swi_returns_twice_begin(number)
|
||||
#define __swi_returns_twice_end(number, func, call) \
|
||||
__asm__(__swi_import_name(number)) __attribute__((weak, returns_twice))
|
||||
|
||||
#define __swi_variadic_begin(number)
|
||||
#define __swi_variadic_end(number, func, ...) \
|
||||
__asm__(__swi_import_name(number)) __attribute__((weak))
|
||||
|
||||
#else
|
||||
#define __swi_begin(number) static inline __attribute__((flatten))
|
||||
#define __swi_end(number, func, call) { \
|
||||
|
|
@ -59,6 +64,11 @@ extern const int __sys_switab_addres[];
|
|||
((__typeof__(&func)) __sys_switab_addres[number])call; \
|
||||
}
|
||||
|
||||
#define __swi_returns_twice_begin(number) static inline __attribute__((always_inline, returns_twice))
|
||||
#define __swi_returns_twice_end(number, func, call) { \
|
||||
return ((__typeof__(&func)) __sys_switab_addres[number])call; \
|
||||
}
|
||||
|
||||
#define __swi_variadic_begin(number) \
|
||||
_Pragma("GCC diagnostic push") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wformat-nonliteral\"") \
|
||||
|
|
@ -67,6 +77,7 @@ extern const int __sys_switab_addres[];
|
|||
return ((__typeof__(&func)) __sys_switab_addres[number])(__VA_ARGS__, __builtin_va_arg_pack()); \
|
||||
} \
|
||||
_Pragma("GCC diagnostic pop")
|
||||
|
||||
#endif
|
||||
|
||||
#define __swi_format(type, ...) \
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@
|
|||
#define __swi_noreturn_begin(number)
|
||||
#define __swi_noreturn_end(number, func, call)
|
||||
|
||||
#define __swi_returns_twice_begin(number)
|
||||
#define __swi_returns_twice_end(number, func, call)
|
||||
|
||||
#define __swi_variadic_begin(number)
|
||||
#define __swi_variadic_end(number, func, ...)
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,9 @@ unsigned int __attribute__((warning("Function not found in swilib."))) ___bad_sw
|
|||
#define __swi_noreturn_begin(number)
|
||||
#define __swi_noreturn_end(number, func, call)
|
||||
|
||||
#define __swi_returns_twice_begin(number)
|
||||
#define __swi_returns_twice_end(number, func, call)
|
||||
|
||||
#define __swi_variadic_begin(number)
|
||||
#define __swi_variadic_end(number, func, ...)
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@
|
|||
#define __swi_noreturn_begin(number) __swi_pragma(swi_number=number) __swi __arm
|
||||
#define __swi_noreturn_end(number, func, call)
|
||||
|
||||
#define __swi_returns_twice_begin(number) __swi_begin(number)
|
||||
#define __swi_returns_twice_end(number, func, call) __swi_end(number, func, call)
|
||||
|
||||
#define __swi_variadic_begin(number) __swi_begin(number)
|
||||
#define __swi_variadic_end(number, func, ...)
|
||||
|
||||
|
|
|
|||
|
|
@ -87,8 +87,8 @@ TDateTimeSettings *RamDateTimeSettings(void)
|
|||
__swi_end(0x822F, RamDateTimeSettings, ());
|
||||
|
||||
/**
|
||||
* Check if "Auto Time" setting enabled.
|
||||
* @return 1 or 0
|
||||
* Get the address of the "Auto Time" enabled flag.
|
||||
* @return pointer to a byte containing 0 or 1
|
||||
* */
|
||||
__swi_begin(0x80D2)
|
||||
char *RamIsAutoTimeEnabled(void)
|
||||
|
|
@ -115,9 +115,9 @@ int GetTimeZoneShift(const TDate *date, const TTime *time, int timezone_id)
|
|||
__swi_end(0x230, GetTimeZoneShift, (date, time, timezone_id));
|
||||
|
||||
/**
|
||||
* Get week number by date.
|
||||
* Get day of week for a date.
|
||||
* @param date date of the day
|
||||
* @return week number in the year
|
||||
* @return day of week
|
||||
* */
|
||||
__swi_begin(0x0B5)
|
||||
char GetWeek(const TDate *date)
|
||||
|
|
@ -129,7 +129,7 @@ __swi_end(0x0B5, GetWeek, (date));
|
|||
* @return total number of days
|
||||
* */
|
||||
__swi_begin(0x3E8)
|
||||
int64_t GetDays(const TDate *date)
|
||||
int GetDays(const TDate *date)
|
||||
__swi_end(0x3E8, GetDays, (date));
|
||||
|
||||
/**
|
||||
|
|
@ -159,7 +159,7 @@ __swi_end(0x2D0, GetDaysFromMonth, (date));
|
|||
* @return 1 if success, 0 if error
|
||||
* */
|
||||
__swi_begin(0x2C6)
|
||||
int GetSecondsFromDateTime(int *seconds, const TDate *date, const TTime *time, const TDate *epoch)
|
||||
int GetSecondsFromDateTime(uint32_t *seconds, const TDate *date, const TTime *time, const TDate *epoch)
|
||||
__swi_end(0x2C6, GetSecondsFromDateTime, (seconds, date, time, epoch));
|
||||
|
||||
/**
|
||||
|
|
@ -170,7 +170,7 @@ __swi_end(0x2C6, GetSecondsFromDateTime, (seconds, date, time, epoch));
|
|||
* @return 1 if success, 0 if error
|
||||
* */
|
||||
__swi_begin(0x2C7)
|
||||
int GetSecondsFromDateTimeSince1997(int *seconds, const TDate *date, const TTime *time)
|
||||
int GetSecondsFromDateTimeSince1997(uint32_t *seconds, const TDate *date, const TTime *time)
|
||||
__swi_end(0x2C7, GetSecondsFromDateTimeSince1997, (seconds, date, time));
|
||||
|
||||
/**
|
||||
|
|
@ -188,13 +188,13 @@ __swi_end(0x2C8, GetSecondsFromTime, (time));
|
|||
* @param seconds number of seconds
|
||||
* */
|
||||
__swi_begin(0x2CB)
|
||||
void GetTimeFromSeconds(TTime *time, int seconds)
|
||||
void GetTimeFromSeconds(TTime *time, uint32_t seconds)
|
||||
__swi_end(0x2CB, GetTimeFromSeconds, (time, seconds));
|
||||
|
||||
/**
|
||||
* Convert milliseconds to TTime.
|
||||
* @param[out] time output for calculated time
|
||||
* @param milliseconds number of seconds
|
||||
* @param milliseconds number of milliseconds
|
||||
* */
|
||||
__swi_begin(0x3E4)
|
||||
void GetTimeFromMilliseconds(TTime *time, uint32_t milliseconds)
|
||||
|
|
@ -209,7 +209,7 @@ __swi_end(0x3E4, GetTimeFromMilliseconds, (time, milliseconds));
|
|||
* @return 1 if success, 0 if error
|
||||
* */
|
||||
__swi_begin(0x2C9)
|
||||
int GetDateTimeFromSeconds(const int *seconds, TDate *date, TTime *time, const TDate *epoch)
|
||||
int GetDateTimeFromSeconds(const uint32_t *seconds, TDate *date, TTime *time, const TDate *epoch)
|
||||
__swi_end(0x2C9, GetDateTimeFromSeconds, (seconds, date, time, epoch));
|
||||
|
||||
/**
|
||||
|
|
@ -220,7 +220,7 @@ __swi_end(0x2C9, GetDateTimeFromSeconds, (seconds, date, time, epoch));
|
|||
* @return 1 if success, 0 if error
|
||||
* */
|
||||
__swi_begin(0x2CA)
|
||||
int GetDateTimeFromSecondsSince1997(const int *seconds, TDate *date, TTime *time)
|
||||
int GetDateTimeFromSecondsSince1997(const uint32_t *seconds, TDate *date, TTime *time)
|
||||
__swi_end(0x2CA, GetDateTimeFromSecondsSince1997, (seconds, date, time));
|
||||
|
||||
/**
|
||||
|
|
@ -277,7 +277,7 @@ void DateAddDays(TDate *date, int days)
|
|||
__swi_end(0x3E5, DateAddDays, (date, days));
|
||||
|
||||
/**
|
||||
* Add or subtract days from a date.
|
||||
* Add or subtract months from a date.
|
||||
* @param date date of the day
|
||||
* @param months number of months to add (positive) or subtract (negative)
|
||||
* */
|
||||
|
|
@ -286,7 +286,7 @@ void DateAddMonths(TDate *date, int months)
|
|||
__swi_end(0x3E6, DateAddMonths, (date, months));
|
||||
|
||||
/**
|
||||
* Add or subtract days from a date.
|
||||
* Add or subtract years from a date.
|
||||
* @param date date of the day
|
||||
* @param years number of years to add (positive) or subtract (negative)
|
||||
* */
|
||||
|
|
@ -297,9 +297,10 @@ __swi_end(0x3E7, DateAddYears, (date, years));
|
|||
/**
|
||||
* Get array of time zones.
|
||||
* @return pointer to the array
|
||||
* @platforms NSG, ELKA
|
||||
* */
|
||||
__swi_begin(0x83DF)
|
||||
TZ *RamTimeZones()
|
||||
TZ *RamTimeZones(void)
|
||||
__swi_end(0x83DF, RamTimeZones, ());
|
||||
|
||||
/**
|
||||
|
|
@ -307,7 +308,7 @@ __swi_end(0x83DF, RamTimeZones, ());
|
|||
* @return time zone id
|
||||
* */
|
||||
__swi_begin(0x3E0)
|
||||
int GetCurrentTimeZone()
|
||||
int GetCurrentTimeZone(void)
|
||||
__swi_end(0x3E0, GetCurrentTimeZone, ());
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -20,12 +20,18 @@ __swilib_begin
|
|||
* @{
|
||||
* */
|
||||
|
||||
/**
|
||||
* EELITE write-operation completion callback.
|
||||
* @param status operation status; zero indicates success
|
||||
* */
|
||||
typedef void (*EELiteCallback)(int status);
|
||||
|
||||
/**
|
||||
* Get the last ID of the EELITE blocks.
|
||||
* @return ID
|
||||
* */
|
||||
__swi_begin(0x028)
|
||||
uint32_t GetEELiteMaxID()
|
||||
uint32_t GetEELiteMaxID(void)
|
||||
__swi_end(0x028, GetEELiteMaxID, ());
|
||||
|
||||
/**
|
||||
|
|
@ -41,7 +47,6 @@ __swi_end(0x02B, GetEELiteBlockSizeVersion, (block, size, version));
|
|||
|
||||
/**
|
||||
* Get a pointer to the EELITE block data.
|
||||
* Each EELITE block is directly stored in the flash and can be accessed via memory address.
|
||||
* @param block EELITE block number
|
||||
* @return pointer to the block data
|
||||
* */
|
||||
|
|
@ -53,13 +58,13 @@ __swi_end(0x02A, GetEELiteBlockAddress, (block));
|
|||
* Begin writing to the EELITE block.
|
||||
* @param block EELITE block number
|
||||
* @param size size of writing
|
||||
* @param version block version
|
||||
* @param null set to NULL
|
||||
* @param version block version; only the low byte is stored
|
||||
* @param callback optional completion callback
|
||||
* @return 0 or error
|
||||
* */
|
||||
__swi_begin(0x02D)
|
||||
int StartWriteEELiteBlock(uint32_t block, uint32_t size, uint32_t version, int *null)
|
||||
__swi_end(0x02D, StartWriteEELiteBlock, (block, size, version, null));
|
||||
int StartWriteEELiteBlock(uint32_t block, uint32_t size, uint32_t version, EELiteCallback callback)
|
||||
__swi_end(0x02D, StartWriteEELiteBlock, (block, size, version, callback));
|
||||
|
||||
/**
|
||||
* Write data to the EELITE block.
|
||||
|
|
@ -67,32 +72,32 @@ __swi_end(0x02D, StartWriteEELiteBlock, (block, size, version, null));
|
|||
* @param buf new block data
|
||||
* @param offset offset in the block
|
||||
* @param size size to the write
|
||||
* @param null set to NULL
|
||||
* @param callback optional completion callback
|
||||
* @return 0 or error
|
||||
* */
|
||||
__swi_begin(0x030)
|
||||
int WriteEELiteBlock(uint32_t block, void *buf, uint32_t offset, uint32_t size, int *null)
|
||||
__swi_end(0x030, WriteEELiteBlock, (block, buf, offset, size, null));
|
||||
int WriteEELiteBlock(uint32_t block, const void *buf, uint32_t offset, uint32_t size, EELiteCallback callback)
|
||||
__swi_end(0x030, WriteEELiteBlock, (block, buf, offset, size, callback));
|
||||
|
||||
/**
|
||||
* Finish writing to the EELITE block.
|
||||
* @param block EELITE block number
|
||||
* @param null set to NULL
|
||||
* @param callback optional completion callback
|
||||
* @return 0 or error
|
||||
* */
|
||||
__swi_begin(0x02E)
|
||||
int FinishWriteEELiteBlock(uint32_t block, int *null)
|
||||
__swi_end(0x02E, FinishWriteEELiteBlock, (block, null));
|
||||
int FinishWriteEELiteBlock(uint32_t block, EELiteCallback callback)
|
||||
__swi_end(0x02E, FinishWriteEELiteBlock, (block, callback));
|
||||
|
||||
/**
|
||||
* Delete block in the EELITE.
|
||||
* @param block EELITE block number
|
||||
* @param null set to NULL
|
||||
* @param callback optional completion callback
|
||||
* @return 0 or error
|
||||
* */
|
||||
__swi_begin(0x02F)
|
||||
int DeleteEELiteBlock(uint32_t block, int *null)
|
||||
__swi_end(0x02F, DeleteEELiteBlock, (block, null));
|
||||
int DeleteEELiteBlock(uint32_t block, EELiteCallback callback)
|
||||
__swi_end(0x02F, DeleteEELiteBlock, (block, callback));
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
@ -102,16 +107,16 @@ __swi_end(0x02F, DeleteEELiteBlock, (block, null));
|
|||
* */
|
||||
|
||||
/**
|
||||
* Get the last ID of the EEFUL blocks.
|
||||
* Get the last ID of the EEFULL blocks.
|
||||
* @return ID
|
||||
* */
|
||||
__swi_begin(0x029)
|
||||
uint32_t GetEEFullMaxID()
|
||||
uint32_t GetEEFullMaxID(void)
|
||||
__swi_end(0x029, GetEEFullMaxID, ());
|
||||
|
||||
/**
|
||||
* Get info about the EEFUL block.
|
||||
* @param block EEFUL block number
|
||||
* Get info about the EEFULL block.
|
||||
* @param block EEFULL block number
|
||||
* @param[out] size block size
|
||||
* @param[out] version block version
|
||||
* @return 0 or error
|
||||
|
|
@ -121,8 +126,8 @@ int EEFullGetBlockInfo(uint32_t block, int *size, char *version)
|
|||
__swi_end(0x02C, EEFullGetBlockInfo, (block, size, version));
|
||||
|
||||
/**
|
||||
* Read block from the EEFUL.
|
||||
* @param block EEFUL block number
|
||||
* Read block from the EEFULL.
|
||||
* @param block EEFULL block number
|
||||
* @param[out] buf output buffer for block data
|
||||
* @param offset offset in the block data
|
||||
* @param size size to the read
|
||||
|
|
@ -134,8 +139,8 @@ void EEFullReadBlock(int block, void *buf, int offset, int size, int cepid, int
|
|||
__swi_end(0x086, EEFullReadBlock, (block, buf, offset, size, cepid, msg));
|
||||
|
||||
/**
|
||||
* Update block in the EEFUL.
|
||||
* @param block EEFUL block number
|
||||
* Update block in the EEFULL.
|
||||
* @param block EEFULL block number
|
||||
* @param buf new block data
|
||||
* @param offset offset in the block
|
||||
* @param size size to the write
|
||||
|
|
@ -147,8 +152,8 @@ void EEFullWriteBlock(int block, const void *buf, int offset, int size, int cepi
|
|||
__swi_end(0x087, EEFullWriteBlock, (block, buf, offset, size, cepid, msg));
|
||||
|
||||
/**
|
||||
* Delete block in the EEFUL.
|
||||
* @param block EEFUL block number
|
||||
* Delete block in the EEFULL.
|
||||
* @param block EEFULL block number
|
||||
* @param cepid CEPID, set to 0xFFFF
|
||||
* @param msg GBS message ID, set to 0
|
||||
* @return 0 or error
|
||||
|
|
@ -158,8 +163,8 @@ int EEFullDeleteBlock(uint32_t block, int cepid, int msg)
|
|||
__swi_end(0x239, EEFullDeleteBlock, (block, cepid, msg));
|
||||
|
||||
/**
|
||||
* Create new block in the EEFUL.
|
||||
* @param block EEFUL block number
|
||||
* Create new block in the EEFULL.
|
||||
* @param block EEFULL block number
|
||||
* @param size block size
|
||||
* @param version block version
|
||||
* @param cepid CEPID, set to 0xFFFF
|
||||
|
|
|
|||
|
|
@ -107,8 +107,7 @@ struct REGEXPLEXT {
|
|||
};
|
||||
|
||||
/**
|
||||
* Structure of the registered extension in RAM (on SGOLD).
|
||||
* Returend by #get_regextpnt_by_uid
|
||||
* Native Explorer extension entry returned by #get_regextpnt_by_uid on SG and X75.
|
||||
* */
|
||||
struct REGEXPLEXT_ARM_NEW {
|
||||
int zero;
|
||||
|
|
@ -149,7 +148,7 @@ __swi_end(0x095, UnRegExplorerExt, (ext));
|
|||
* @builtin ELKA, NSG, X75, SG
|
||||
* */
|
||||
__swi_begin(0x81B8)
|
||||
TREGEXPLEXT *EXT_TOP(void)
|
||||
void *EXT_TOP(void)
|
||||
__swi_end(0x81B8, EXT_TOP, ());
|
||||
|
||||
/**
|
||||
|
|
@ -195,6 +194,7 @@ __swi_end(0x2DB, MediaSendCSM_Open, (file, path));
|
|||
* @param flag 0 or 2
|
||||
* @param open_mode unknown param, set 0
|
||||
* @return CSM ID
|
||||
* @platforms NSG, ELKA
|
||||
* */
|
||||
__swi_begin(0x3CC)
|
||||
int PersMenuCSM_Open(const WSHDR *file_name, const WSHDR *dir, int flag, int open_mode)
|
||||
|
|
@ -256,6 +256,7 @@ __swi_end(0x094, ExecuteFile, (filepath, mime, param));
|
|||
* @param transfer_id transfer ID (0 ... 31)
|
||||
* @param[out] errp variable for error
|
||||
* @return 0 or error
|
||||
* @note Paths are WSHDR strings on NSG and ELKA, and C strings on SG and X75.
|
||||
*
|
||||
* ```
|
||||
* int transfer_id = 0; // warning: needed function for safe transfer_id allocation
|
||||
|
|
@ -264,36 +265,42 @@ __swi_end(0x094, ExecuteFile, (filepath, mime, param));
|
|||
* ```
|
||||
* */
|
||||
__swi_begin(0x1F0)
|
||||
#ifdef NEWSGOLD
|
||||
int ExplorerCopyFile(const WSHDR *from, const WSHDR *to, int overwrite, char transfer_id, uint32_t *errp)
|
||||
#else
|
||||
int ExplorerCopyFile(const char *from, const char *to, int overwrite, char transfer_id, uint32_t *errp)
|
||||
#endif
|
||||
__swi_end(0x1F0, ExplorerCopyFile, (from, to, overwrite, transfer_id, errp));
|
||||
|
||||
/**
|
||||
* Set transfer state.
|
||||
* @param transfer_id transfer ID (0 ... 31)
|
||||
* @param state see #ExplorerTransferStates
|
||||
* @return 0 or error
|
||||
* @platforms NSG, ELKA, X75, SG
|
||||
* */
|
||||
__swi_begin(0x1F1)
|
||||
int ExplorerSetTransferState(char transfer_id, int state)
|
||||
void ExplorerSetTransferState(char transfer_id, int state)
|
||||
__swi_end(0x1F1, ExplorerSetTransferState, (transfer_id, state));
|
||||
|
||||
/**
|
||||
* Get MIME type.
|
||||
* @param uid file uid, see #GetExtUid_ws, #GetExtUidByFileName_ws
|
||||
* @param[out] mime_type pointer to WSHDR string
|
||||
* @param unk_0 unknown param, set to 0
|
||||
* @return 1: success, 0: error
|
||||
* @param[out] mime_type output string, or NULL to only test whether the requested mapping exists
|
||||
* @param occurrence zero-based index among entries matching @p uid; 0 selects the first match
|
||||
* @return 1 if the requested mapping exists, 0 otherwise; when @p mime_type is non-NULL, the mapping is also copied
|
||||
* @platforms NSG, ELKA
|
||||
* */
|
||||
__swi_begin(0x3C8)
|
||||
int GetMimeType(int uid, WSHDR *mime_type, int unk_0)
|
||||
__swi_end(0x3C8, GetMimeType, (uid, mime_type, unk_0));
|
||||
int GetMimeType(int uid, WSHDR *mime_type, int occurrence)
|
||||
__swi_end(0x3C8, GetMimeType, (uid, mime_type, occurrence));
|
||||
|
||||
/**
|
||||
* Build a full path by a file name and a directory name.
|
||||
* @param[out] path pointer to WSHDR string
|
||||
* @param file_name pointer to WSHDR string, that contains a file name
|
||||
* @param dir pointer to WSHDR string, that contains a directory name
|
||||
* @return 1: success, 0: error
|
||||
* @return 1 on success, 0 for NULL arguments; NSG and ELKA also return 0 for insufficient capacity in @p path
|
||||
* @warning On SG and X75, @p path must have enough capacity for the complete result; firmware does not check it.
|
||||
* */
|
||||
__swi_begin(0x3D5)
|
||||
int BuildPath(WSHDR *path, const WSHDR *file_name, const WSHDR *dir)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ enum FileAttributes {
|
|||
enum FileSeekOrigin {
|
||||
S_SET = 0, /*!< cur_offset = offset */
|
||||
S_CUR = 1, /*!< cur_offset = cur_offset + offset */
|
||||
S_END = 2, /*!< cur_offset = file_size - 1 */
|
||||
S_END = 2, /*!< cur_offset = file_size + offset */
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -241,14 +241,14 @@ __swi_end(0x00E, sys_fflush, (fd, err));
|
|||
/**
|
||||
* Move to the desired position within the file.
|
||||
* @param fd file descriptor
|
||||
* @param offset desired position
|
||||
* @param offset signed offset
|
||||
* @param origin see #FileSeekOrigin
|
||||
* @param[out] err error code
|
||||
* @param[out] err2 error code
|
||||
* @return 0 or error
|
||||
* @return resulting file position, or -1 on error
|
||||
* */
|
||||
__swi_begin(0x00F)
|
||||
long sys_lseek(int fd, uint32_t offset, uint32_t origin, uint32_t *err, uint32_t *err2)
|
||||
long sys_lseek(int fd, int32_t offset, uint32_t origin, uint32_t *err, uint32_t *err2)
|
||||
__swi_end(0x00F, sys_lseek, (fd, offset, origin, err, err2));
|
||||
|
||||
/**
|
||||
|
|
@ -282,7 +282,7 @@ __swi_end(0x08F, sys_rmdir, (dirname, err));
|
|||
* @copydoc sys_rmdir
|
||||
* */
|
||||
__swi_begin(0x3B8)
|
||||
int sys_rmdir_ws(const WSHDR *path, unsigned int *err)
|
||||
int sys_rmdir_ws(const WSHDR *path, uint32_t *err)
|
||||
__swi_end(0x3B8, sys_rmdir_ws, (path, err));
|
||||
|
||||
/**
|
||||
|
|
@ -317,7 +317,7 @@ __swi_end(0x16B, sys_unlink, (path, err));
|
|||
* @copydoc sys_unlink
|
||||
* */
|
||||
__swi_begin(0x3BA)
|
||||
int sys_unlink_ws(const WSHDR *path, unsigned int *err)
|
||||
int sys_unlink_ws(const WSHDR *path, uint32_t *err)
|
||||
__swi_end(0x3BA, sys_unlink_ws, (path, err));
|
||||
|
||||
/**
|
||||
|
|
@ -550,9 +550,20 @@ __swi_begin(0x06C)
|
|||
int FindNextFile(DIR_ENTRY *dir_entry, uint32_t *err)
|
||||
__swi_end(0x06C, FindNextFile, (dir_entry, err));
|
||||
|
||||
/**
|
||||
* Convert a directory-search result to the SG/X75 file-list record.
|
||||
* @param dir_entry directory-search result
|
||||
* @param[out] file_info output buffer of at least 0x110 bytes
|
||||
* @return 1 on success, 0 if the entry cannot be converted
|
||||
* @platforms X75, SG
|
||||
* */
|
||||
__swi_begin(0x083)
|
||||
int GetPathOfFoundFile(DIR_ENTRY *dir_entry, void *file_info)
|
||||
__swi_end(0x083, GetPathOfFoundFile, (dir_entry, file_info));
|
||||
|
||||
/**
|
||||
* Close search session
|
||||
* @param dir_entry first found file
|
||||
* @param dir_entry pointer to the search session
|
||||
* @param[out] err error code
|
||||
* @return 0 or error
|
||||
* */
|
||||
|
|
@ -573,7 +584,7 @@ __swi_end(0x08A, GetFreeFlexSpace, (drive, err));
|
|||
/**
|
||||
* Get total space on a specified disk.
|
||||
* @param drive number of the drive: 0-4
|
||||
* @param[out] err error code
|
||||
* @param err unused
|
||||
* @return bytes count
|
||||
* */
|
||||
__swi_begin(0x08B)
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ struct LMAN_DATA {
|
|||
* @return 1 or 0
|
||||
* */
|
||||
__swi_begin(0x0A7)
|
||||
char IsGPRSEnabled()
|
||||
char IsGPRSEnabled(void)
|
||||
__swi_end(0x0A7, IsGPRSEnabled, ());
|
||||
|
||||
/**
|
||||
|
|
@ -116,15 +116,16 @@ __swi_end(0x0A7, IsGPRSEnabled, ());
|
|||
* @return 1 or 0
|
||||
* */
|
||||
__swi_begin(0x284)
|
||||
char IsGPRSAvailable()
|
||||
char IsGPRSAvailable(void)
|
||||
__swi_end(0x284, IsGPRSAvailable, ());
|
||||
|
||||
/**
|
||||
* Check if EDGE available in the current network.
|
||||
* Check if EDGE is available in the current network.
|
||||
* @return 1 or 0
|
||||
* @platforms NSG, ELKA
|
||||
* */
|
||||
__swi_begin(0x285)
|
||||
char IsEDGEAvailable()
|
||||
char IsEDGEAvailable(void)
|
||||
__swi_end(0x285, IsEDGEAvailable, ());
|
||||
|
||||
/**
|
||||
|
|
@ -132,7 +133,7 @@ __swi_end(0x285, IsEDGEAvailable, ());
|
|||
* @return 1 or 0
|
||||
* */
|
||||
__swi_begin(0x0A8)
|
||||
char IsGPRSConnected()
|
||||
char IsGPRSConnected(void)
|
||||
__swi_end(0x0A8, IsGPRSConnected, ());
|
||||
|
||||
/**
|
||||
|
|
@ -1093,9 +1094,10 @@ __swi_end(0x4AD, zDLL_Init, (list));
|
|||
/**
|
||||
* Get name of the current internet profile.
|
||||
* @return C-string
|
||||
* @platforms NSG, ELKA
|
||||
* */
|
||||
__swi_begin(0x828E)
|
||||
const char *RamActiveGPRSProfileName()
|
||||
const char *RamActiveGPRSProfileName(void)
|
||||
__swi_end(0x828E, RamActiveGPRSProfileName, ());
|
||||
|
||||
/** @} */
|
||||
|
|
@ -1116,7 +1118,7 @@ __swi_end(0x06F, RefreshGPRSTraffic, ());
|
|||
* Reset the GPRS traffic counter.
|
||||
* */
|
||||
__swi_begin(0x0A6)
|
||||
void ResetGPRSTraffic()
|
||||
void ResetGPRSTraffic(void)
|
||||
__swi_end(0x0A6, ResetGPRSTraffic, ());
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -66,9 +66,10 @@ __swi_end(0x020, DrawScreenSaver, ());
|
|||
|
||||
/**
|
||||
* Close screensaver screen.
|
||||
* @platforms NSG, ELKA
|
||||
* */
|
||||
__swi_begin(0x09C)
|
||||
void CloseScreensaver()
|
||||
void CloseScreensaver(void)
|
||||
__swi_end(0x09C, CloseScreensaver, ());
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ __swi_end(0x05F, GetFreeRamAvail, ());
|
|||
* @return size
|
||||
* */
|
||||
__swi_begin(0x828B)
|
||||
int *RamTotalHeapSize()
|
||||
int *RamTotalHeapSize(void)
|
||||
__swi_end(0x828B, RamTotalHeapSize, ());
|
||||
|
||||
/**
|
||||
|
|
@ -63,7 +63,7 @@ __swi_end(0x828B, RamTotalHeapSize, ());
|
|||
* @return size
|
||||
* */
|
||||
__swi_begin(0x828C)
|
||||
int *RamTemporaryHeapSize()
|
||||
int *RamTemporaryHeapSize(void)
|
||||
__swi_end(0x828C, RamTemporaryHeapSize, ());
|
||||
|
||||
/**
|
||||
|
|
@ -93,7 +93,7 @@ __swi_end(0x1D5, Get_Phone_Info, (index));
|
|||
* @return iso code, example: ru, en
|
||||
* */
|
||||
__swi_begin(0x0AA)
|
||||
char *GetCurrentLocale()
|
||||
char *GetCurrentLocale(void)
|
||||
__swi_end(0x0AA, GetCurrentLocale, ());
|
||||
|
||||
/**
|
||||
|
|
@ -201,17 +201,19 @@ __swi_end(0x24C, GetPeripheryState, (device, check));
|
|||
/**
|
||||
* Get bluetooth visibility.
|
||||
* @return visibility
|
||||
* @platforms NSG, ELKA
|
||||
* */
|
||||
__swi_begin(0x287)
|
||||
int BT_GetLocVisibility()
|
||||
int BT_GetLocVisibility(void)
|
||||
__swi_end(0x287, BT_GetLocVisibility, ());
|
||||
|
||||
/**
|
||||
* Own bluetooth name.
|
||||
* @return C-string
|
||||
* @note Only on models with Bluetooth.
|
||||
* */
|
||||
__swi_begin(0x828D)
|
||||
const char *RamBluetoothDeviceName()
|
||||
const char *RamBluetoothDeviceName(void)
|
||||
__swi_end(0x828D, RamBluetoothDeviceName, ());
|
||||
|
||||
/**
|
||||
|
|
@ -244,7 +246,7 @@ __swi_end(0x829F, RamIsBTHeadsetConnected, ());
|
|||
* @return unknown
|
||||
* */
|
||||
__swi_begin(0x009D)
|
||||
void *GetMissedEventsPtr()
|
||||
void *GetMissedEventsPtr(void)
|
||||
__swi_end(0x009D, GetMissedEventsPtr, ());
|
||||
|
||||
/** @} */
|
||||
|
|
@ -336,11 +338,11 @@ char *RamRingtoneStatus()
|
|||
__swi_end(0x80CB, RamRingtoneStatus, ());
|
||||
|
||||
/**
|
||||
* Pointer to the information about current file operations.
|
||||
* @return unknown
|
||||
* Get the state of the file-operation indicator.
|
||||
* @return pointer to firmware-owned indicator state
|
||||
* */
|
||||
__swi_begin(0x828A)
|
||||
void *RamIsFileCache()
|
||||
void *RamIsFileCache(void)
|
||||
__swi_end(0x828A, RamIsFileCache, ());
|
||||
|
||||
/** @} */
|
||||
|
|
|
|||
|
|
@ -187,9 +187,10 @@ __swi_end(0x80DD, RamCurrentTrack, ());
|
|||
/**
|
||||
* Pointer to the audio params (unknown).
|
||||
* @return unknown
|
||||
* @platforms X75, SG
|
||||
* */
|
||||
__swi_begin(0x809B)
|
||||
void *RamAudioParamsAddr()
|
||||
void *RamAudioParamsAddr(void)
|
||||
__swi_end(0x809B, RamAudioParamsAddr, ());
|
||||
|
||||
/**
|
||||
|
|
@ -206,15 +207,16 @@ __swi_end(0x80CE, RamDateTime, ());
|
|||
* @deprecated use #RamPressedKey
|
||||
* */
|
||||
__swi_begin(0x80E2)
|
||||
char *RamKeyBuffer()
|
||||
char *RamKeyBuffer(void)
|
||||
__swi_end(0x80E2, RamKeyBuffer, ());
|
||||
|
||||
/**
|
||||
* Check if user typing phone number.
|
||||
* @return 1 of 0
|
||||
* @return pointer to a byte that is 1 while a phone number is being entered and 0 otherwise
|
||||
* @platforms NSG, ELKA
|
||||
* */
|
||||
__swi_begin(0x828F)
|
||||
char *RamIsNumberTyping()
|
||||
char *RamIsNumberTyping(void)
|
||||
__swi_end(0x828F, RamIsNumberTyping, ());
|
||||
|
||||
/**
|
||||
|
|
@ -233,14 +235,6 @@ __swi_begin(0x8251)
|
|||
void *RamSizeOfPart()
|
||||
__swi_end(0x8251, RamSizeOfPart, ());
|
||||
|
||||
/**
|
||||
* Unknown
|
||||
* @return unknown
|
||||
* */
|
||||
__swi_begin(0x083)
|
||||
void *GetPathOfFoundFile()
|
||||
__swi_end(0x083, GetPathOfFoundFile, ());
|
||||
|
||||
/**
|
||||
* Get size of the recevied or sent file.
|
||||
* @return size
|
||||
|
|
@ -282,19 +276,22 @@ void editOrNewTXTModule(const char *file)
|
|||
__swi_end(0x03D, editOrNewTXTModule, (file));
|
||||
|
||||
/**
|
||||
* Unknown.
|
||||
* Toggle vibration for the current profile.
|
||||
* @platforms X75, SG
|
||||
* */
|
||||
__swi_begin(0x055)
|
||||
void SwitchVibraOnOff()
|
||||
void SwitchVibraOnOff(void)
|
||||
__swi_end(0x055, SwitchVibraOnOff, ());
|
||||
|
||||
/**
|
||||
* Unknown.
|
||||
* @param profile_id profile ID
|
||||
* @return unknown
|
||||
* @platforms X75, SG
|
||||
* */
|
||||
__swi_begin(0x07B)
|
||||
int GetProfileFilter()
|
||||
__swi_end(0x07B, GetProfileFilter, ());
|
||||
int GetProfileFilter(int profile_id)
|
||||
__swi_end(0x07B, GetProfileFilter, (profile_id));
|
||||
|
||||
/**
|
||||
* @name Nucleus
|
||||
|
|
|
|||
|
|
@ -225,9 +225,9 @@ __swi_end(0x132, memmove, (destination, source, num));
|
|||
* @return When longjmp is called with the information set to env, the macro returns again;
|
||||
* this time it returns the value passed to longjmp as second argument if this is different from zero, or 1 if it is zero.
|
||||
* */
|
||||
__swi_begin(0x162)
|
||||
__swi_returns_twice_begin(0x162)
|
||||
int setjmp(jmp_buf env)
|
||||
__swi_end(0x162, setjmp, (env));
|
||||
__swi_returns_twice_end(0x162, setjmp, (env));
|
||||
|
||||
/**
|
||||
* Long jump.
|
||||
|
|
@ -405,18 +405,6 @@ __swi_begin(0x01B)
|
|||
size_t strlen(const char *str)
|
||||
__swi_end(0x01B, strlen, (str));
|
||||
|
||||
/**
|
||||
* Locate characters in string.
|
||||
* @param str1 C string to be scanned.
|
||||
* @param str2 C string containing the characters to match.
|
||||
* @return A pointer to the first occurrence in str1 of any of the characters that are part of str2,
|
||||
* or a null pointer if none of the characters of str2 is found in str1 before the terminating null-character.
|
||||
* @return If none of the characters of str2 is present in str1, a null pointer is returned.
|
||||
*/
|
||||
__swi_begin(0x113)
|
||||
char *strpbrk(const char *str1, const char *str2)
|
||||
__swi_end(0x113, strpbrk, (str1, str2));
|
||||
|
||||
/**
|
||||
* Get span until character in string.
|
||||
* @param str1 C string to be scanned.
|
||||
|
|
@ -651,7 +639,7 @@ __swi_end(0x2F1, dlclose, (handle));
|
|||
* @builtin ELKA, NSG, X75, SG
|
||||
* */
|
||||
__swi_begin(0x2F7)
|
||||
const char *dlerror()
|
||||
const char *dlerror(void)
|
||||
__swi_end(0x2F7, dlerror, ());
|
||||
|
||||
/** @} */
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ __swi_end(0x093, RebootPhone, ());
|
|||
/**
|
||||
* Set state for SLI indicator.
|
||||
* @param state state value 0...4
|
||||
* @platforms ELKA
|
||||
* @platforms NSG, ELKA
|
||||
* */
|
||||
__swi_begin(0x036)
|
||||
void SLI_SetState(uint8_t state)
|
||||
|
|
@ -239,14 +239,14 @@ __swi_end(0x80D5, RamIsLocked, ());
|
|||
* Lock keyboard.
|
||||
* */
|
||||
__swi_begin(0x0A9)
|
||||
void KbdLock()
|
||||
void KbdLock(void)
|
||||
__swi_end(0x0A9, KbdLock, ());
|
||||
|
||||
/**
|
||||
* Unlock keyboard.
|
||||
* */
|
||||
__swi_begin(0x0B9)
|
||||
void KbdUnlock()
|
||||
void KbdUnlock(void)
|
||||
__swi_end(0x0B9, KbdUnlock, ());
|
||||
|
||||
/**
|
||||
|
|
@ -429,9 +429,10 @@ __swi_end(0x382, ClearClipboard, (unk));
|
|||
|
||||
/**
|
||||
* Run AlarmClock ringing.
|
||||
* @platforms X75, SG
|
||||
* */
|
||||
__swi_begin(0x035)
|
||||
void AlarmClockRing()
|
||||
void AlarmClockRing(void)
|
||||
__swi_end(0x035, AlarmClockRing, ());
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ typedef struct NU_DRIVER_STRUCT {
|
|||
* */
|
||||
__swi_begin(0x300)
|
||||
int NU_Create_Task(NU_TASK *task, CHAR *name,
|
||||
void (*task_entry)(int, void *), unsigned long argc,
|
||||
void (*task_entry)(unsigned long, void *), unsigned long argc,
|
||||
void *argv, void *stack_address, unsigned long stack_size,
|
||||
OPTION priority, unsigned long time_slice,
|
||||
OPTION preempt, OPTION auto_start)
|
||||
|
|
@ -984,10 +984,18 @@ char *NU_Release_Information(void)
|
|||
__swi_end(0x365, NU_Release_Information, ());
|
||||
|
||||
|
||||
/** @note Aliases NU_Release_Information in ELKA and NSG firmware. */
|
||||
__swi_begin(0x366)
|
||||
char *NU_License_Information(void)
|
||||
__swi_end(0x366, NU_License_Information, ());
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name History functions
|
||||
* @warning These functions are not present in ELKA, NSG, X75, or SG firmware.
|
||||
* @{
|
||||
* */
|
||||
|
||||
__swi_begin(0x367)
|
||||
void NU_Disable_History_Saving(void)
|
||||
|
|
@ -1014,6 +1022,7 @@ __swi_end(0x36A, NU_Retrieve_History_Entry, (id, param1, param2, param3, time, t
|
|||
|
||||
/**
|
||||
* @name Input/Output Driver functions
|
||||
* @warning These functions are not present in ELKA, NSG, X75, or SG firmware.
|
||||
* @{
|
||||
* */
|
||||
__swi_begin(0x36B)
|
||||
|
|
@ -1057,25 +1066,30 @@ __swi_end(0x371, NU_Driver_Pointers, (pointer_list, maximum_pointers));
|
|||
* @name Supervisor and User mode functions
|
||||
* @{
|
||||
* */
|
||||
/** @warning This function is not present in ELKA, NSG, X75, or SG firmware. */
|
||||
__swi_begin(0x372)
|
||||
unsigned long NU_IS_SUPERVISOR_MODE()
|
||||
unsigned long NU_IS_SUPERVISOR_MODE(void)
|
||||
__swi_end(0x372, NU_IS_SUPERVISOR_MODE, ());
|
||||
|
||||
|
||||
/** @warning This function is not present in ELKA or NSG firmware. */
|
||||
__swi_begin(0x373)
|
||||
void NU_SUPERVISOR_MODE(unsigned long nu_svc_usr_var)
|
||||
__swi_end(0x373, NU_SUPERVISOR_MODE, (nu_svc_usr_var));
|
||||
void NU_SUPERVISOR_MODE_P(void *nu_svc_usr_var)
|
||||
__swi_end(0x373, NU_SUPERVISOR_MODE_P, (nu_svc_usr_var));
|
||||
|
||||
|
||||
__swi_begin(0x374)
|
||||
void NU_USER_MODE(unsigned long nu_svc_usr_var)
|
||||
__swi_end(0x374, NU_USER_MODE, (nu_svc_usr_var));
|
||||
void NU_USER_MODE_P(void *nu_svc_usr_var)
|
||||
__swi_end(0x374, NU_USER_MODE_P, (nu_svc_usr_var));
|
||||
|
||||
// FIXME: NU_SUPERV_USER_VARIABLES is macro...
|
||||
/** @return Address of the Nucleus `TCD_Current_Thread` global. */
|
||||
__swi_begin(0x8375)
|
||||
void *NU_SUPERV_USER_VARIABLES(void)
|
||||
__swi_end(0x8375, NU_SUPERV_USER_VARIABLES, ());
|
||||
|
||||
#define NU_SUPERVISOR_MODE() NU_SUPERVISOR_MODE_P(*(void **)NU_SUPERV_USER_VARIABLES())
|
||||
#define NU_USER_MODE() NU_USER_MODE_P(*(void **)NU_SUPERV_USER_VARIABLES())
|
||||
|
||||
/** @} */
|
||||
|
||||
__swilib_end
|
||||
|
|
|
|||
|
|
@ -176,11 +176,17 @@ __swi_end(0x0B0, DrawPicWithCanvas, (x, y, picture));
|
|||
* @param x, y image coordinates
|
||||
* @param picture image number
|
||||
* @param pen replace black color or NULL
|
||||
* @param brush replace background color or NULL (SG and X75 only)
|
||||
* @warning Function from the patch "API", see: https://patches.kibab.com/patches/search.php5?action=search&kw=API
|
||||
* */
|
||||
__swi_begin(0x0B1)
|
||||
#ifdef NEWSGOLD
|
||||
void DrawColorPicWithCanvas(int x, int y, int picture, const char *pen)
|
||||
__swi_end(0x0B1, DrawColorPicWithCanvas, (x, y, picture, pen));
|
||||
#else
|
||||
void DrawColorPicWithCanvas(int x, int y, int picture, const char *pen, const char *brush)
|
||||
__swi_end(0x0B1, DrawColorPicWithCanvas, (x, y, picture, pen, brush));
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Draw a multi-line string.
|
||||
|
|
@ -274,13 +280,13 @@ __swi_end(0x088, GetAccessoryType, ());
|
|||
|
||||
/**
|
||||
* Get missed events count.
|
||||
* @param Event see #MissedEvent
|
||||
* @param event see #MissedEvent
|
||||
* @return count
|
||||
* @warning Function from the patch "API", see: https://patches.kibab.com/patches/search.php5?action=search&kw=API
|
||||
* */
|
||||
__swi_begin(0x009E)
|
||||
int GetMissedEventCount(uint32_t Event)
|
||||
__swi_end(0x009E, GetMissedEventCount, (Event));
|
||||
int GetMissedEventCount(uint32_t event)
|
||||
__swi_end(0x009E, GetMissedEventCount, (event));
|
||||
|
||||
/**
|
||||
* Convert Chinese one-byte C-string to WHSDR.
|
||||
|
|
@ -505,7 +511,7 @@ __swi_end(0x1EE, ProgressCalculate, (current, total));
|
|||
* @warning Function from the patch "GraphPatchManager", see: https://patches.kibab.com/patches/search.php5?action=search&kw=GraphPatchManager
|
||||
* */
|
||||
__swi_begin(0x0B2)
|
||||
void *GetBuildCanvas()
|
||||
void *GetBuildCanvas(void)
|
||||
__swi_end(0x0B2, GetBuildCanvas, ());
|
||||
|
||||
/** @} */
|
||||
|
|
|
|||
|
|
@ -54,16 +54,48 @@ __swi_end(0x223, IsMediaPlayerInBackground, ());
|
|||
* @return pointer to the WSHDR
|
||||
* */
|
||||
__swi_begin(0x082)
|
||||
const WSHDR *GetLastAudioTrackFilename()
|
||||
__swi_end(0x082, GetLastAudioTrackFilename, ());
|
||||
const WSHDR *MediaProc_GetLastAudioTrackFilename()
|
||||
__swi_end(0x082, MediaProc_GetLastAudioTrackFilename, ());
|
||||
|
||||
/**
|
||||
* Get the directory of the last audio track in media player.
|
||||
* Get the directory of the last audio track in the media player.
|
||||
* @return pointer to the WSHDR
|
||||
* */
|
||||
__swi_begin(0x3B2)
|
||||
const WSHDR *GetLastAudioTrackDir()
|
||||
__swi_end(0x3B2, GetLastAudioTrackDir, ());
|
||||
const WSHDR *MediaProc_GetLastAudioTrackDir()
|
||||
__swi_end(0x3B2, MediaProc_GetLastAudioTrackDir, ());
|
||||
|
||||
/**
|
||||
* Get the last activated music filter ID in the media player.
|
||||
* @return unique filter ID
|
||||
* */
|
||||
__swi_begin(0x3AD)
|
||||
int MediaProc_GetLastActivatedMusicFilter()
|
||||
__swi_end(0x3AD, MediaProc_GetLastActivatedMusicFilter, ());
|
||||
|
||||
/**
|
||||
* Get the LUID of the last activated music genre in the media player.
|
||||
* @return unique genre LUID
|
||||
* */
|
||||
__swi_begin(0x3AE)
|
||||
int MediaProc_GetLastActivatedMusicGenreLUID()
|
||||
__swi_end(0x3AE, MediaProc_GetLastActivatedMusicGenreLUID, ());
|
||||
|
||||
/**
|
||||
* Get the LUID of the last activated music artist in the media player.
|
||||
* @return unique artist LUID
|
||||
* */
|
||||
__swi_begin(0x3AF)
|
||||
int MediaProc_GetLastActivatedMusicArtistLUID()
|
||||
__swi_end(0x3AF, MediaProc_GetLastActivatedMusicArtistLUID, ());
|
||||
|
||||
/**
|
||||
* Get the LUID of the last activated music album in the media player.
|
||||
* @return unique album LUID
|
||||
* */
|
||||
__swi_begin(0x3B6)
|
||||
int MediaProc_GetLastActivatedMusicAlbumLUID()
|
||||
__swi_end(0x3B6, MediaProc_GetLastActivatedMusicAlbumLUID, ());
|
||||
|
||||
/**
|
||||
* Close MediaPlayer.
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ struct REG_CLIENT {
|
|||
void *unk1; /**< unknown, set to NULL */
|
||||
void *unk2; /**< unknown, set to NULL */
|
||||
short *hmi_keys; /**< array of HMI key IDs */
|
||||
size_t hmi_keys_count; /**< number of keys in the hmi_keys array */
|
||||
uint8_t hmi_keys_count; /**< number of keys in the hmi_keys array (max 255) */
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -358,16 +358,17 @@ __swi_end(0x3DE, WriteValueToPDFile, (file_id, key, value, size));
|
|||
* @return ID
|
||||
* */
|
||||
__swi_begin(0x0B6)
|
||||
char GetProfile()
|
||||
char GetProfile(void)
|
||||
__swi_end(0x0B6, GetProfile, ());
|
||||
|
||||
/**
|
||||
* Get ID of the active profile.
|
||||
* @return pointer to the ID
|
||||
* @deprecated use #GetProfile
|
||||
* @platforms X75, SG
|
||||
* */
|
||||
__swi_begin(0x80E3)
|
||||
char *RamProfileNum()
|
||||
char *RamProfileNum(void)
|
||||
__swi_end(0x80E3, RamProfileNum, ());
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -433,9 +433,10 @@ __swi_end(0x04A, PlayFile, (flags, folder, file, cepid, msgid, sfo));
|
|||
/**
|
||||
* Get current audio path.
|
||||
* @return id
|
||||
* @platforms NSG, ELKA
|
||||
* */
|
||||
__swi_begin(0x288)
|
||||
int Audio_GetCurrAudioPath()
|
||||
int Audio_GetCurrAudioPath(void)
|
||||
__swi_end(0x288, Audio_GetCurrAudioPath, ());
|
||||
|
||||
/**
|
||||
|
|
@ -462,16 +463,17 @@ __swi_end(0x29A, AACC_AudioTransferReq, (oh, type_and_conn));
|
|||
* @param unk2 unknown, set to 1
|
||||
* @param duration duration in ms
|
||||
* @warning Untested function that is not found in any ELF's.
|
||||
* @platforms X75, SG
|
||||
* */
|
||||
__swi_begin(0x034)
|
||||
void PlaySoundLoop(int unk1, int unk2, int duration)
|
||||
__swi_end(0x034, PlaySoundLoop, (unk1, unk2, duration));
|
||||
|
||||
/**
|
||||
* Change volume (unknown function).
|
||||
* Change the current audio volume.
|
||||
* @param volume volume level
|
||||
* @return unknown
|
||||
* @warning Untested function that is not found in any ELF's.
|
||||
* @return undocumented
|
||||
* @platforms X75, SG
|
||||
* */
|
||||
__swi_begin(0x09A)
|
||||
int ChangeVolume(uint8_t volume)
|
||||
|
|
|
|||
|
|
@ -434,42 +434,42 @@ __swi_end(0x247, GSM_L1_Disable, ());
|
|||
* Syscall, which is used by the phone OS, swi 0.
|
||||
* */
|
||||
__swi_begin(0x000)
|
||||
void loopback0()
|
||||
void loopback0(void)
|
||||
__swi_end(0x000, loopback0, ());
|
||||
|
||||
/**
|
||||
* Syscall, which is used by the phone OS, swi 1.
|
||||
* */
|
||||
__swi_begin(0x001)
|
||||
void loopback1()
|
||||
void loopback1(void)
|
||||
__swi_end(0x001, loopback1, ());
|
||||
|
||||
/**
|
||||
* Syscall, which is used by the phone OS, swi 2.
|
||||
* */
|
||||
__swi_begin(0x002)
|
||||
void loopback2()
|
||||
void loopback2(void)
|
||||
__swi_end(0x002, loopback2, ());
|
||||
|
||||
/**
|
||||
* Syscall, which is used by the phone OS, swi 3.
|
||||
* */
|
||||
__swi_begin(0x003)
|
||||
void loopback3()
|
||||
void loopback3(void)
|
||||
__swi_end(0x003, loopback3, ());
|
||||
|
||||
/**
|
||||
* Syscall, which is used by the phone OS, swi 4.
|
||||
* */
|
||||
__swi_begin(0x004)
|
||||
void loopback4()
|
||||
void loopback4(void)
|
||||
__swi_end(0x004, loopback4, ());
|
||||
|
||||
/**
|
||||
* Syscall, which is used by the phone OS, swi 171.
|
||||
* */
|
||||
__swi_begin(0x0AB)
|
||||
void loopback171()
|
||||
void loopback171(void)
|
||||
__swi_end(0x0AB, loopback171, ());
|
||||
|
||||
/** @} */
|
||||
|
|
|
|||
|
|
@ -201,15 +201,17 @@ __swi_end(0x170, MakeVoiceCall, (number, unk1, unk2));
|
|||
/**
|
||||
* Get SMS status.
|
||||
* @return 1 - send, 2 - recv, 3 - both
|
||||
* @platforms NSG, ELKA
|
||||
* */
|
||||
__swi_begin(0x286)
|
||||
int GetSMSState()
|
||||
int GetSMSState(void)
|
||||
__swi_end(0x286, GetSMSState, ());
|
||||
|
||||
/**
|
||||
* Check for new SMS.
|
||||
* @return 1: when there has new SMS
|
||||
* @return 0: no new SMS
|
||||
* @platforms X75, SG
|
||||
* */
|
||||
__swi_begin(0x046)
|
||||
int HasNewSMS(void)
|
||||
|
|
@ -349,11 +351,12 @@ void EndCallBusy(int param1, int param2)
|
|||
__swi_end(0x066, EndCallBusy, (param1, param2));
|
||||
|
||||
/**
|
||||
* Pointer to the number from the last call.
|
||||
* @return unknown
|
||||
* Number of the last call in call slot 1, as UTF-16 characters.
|
||||
* @return pointer to the first character; the length is at index -1
|
||||
* @note Kept until the next call that gets slot 1.
|
||||
* */
|
||||
__swi_begin(0x8253)
|
||||
char *RamLastCallNum()
|
||||
uint16_t *RamLastCallNum()
|
||||
__swi_end(0x8253, RamLastCallNum, ());
|
||||
|
||||
/**
|
||||
|
|
@ -562,9 +565,10 @@ __swi_end(0x22A, FreeGSMTXTpkt, (pkt));
|
|||
|
||||
/**
|
||||
* Open new received SMS in SMS UI.
|
||||
* @platforms X75, SG
|
||||
* */
|
||||
__swi_begin(0x048)
|
||||
void ReadNewSMS()
|
||||
void ReadNewSMS(void)
|
||||
__swi_end(0x048, ReadNewSMS, ());
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -659,6 +659,7 @@ __swi_end(0x8237, RamIconBar, ());
|
|||
/**
|
||||
* Check state of iconbar (EL71/E71). It can be disabled by #DisableIconBar function.
|
||||
* @return 1 or 0
|
||||
* @platforms ELKA
|
||||
* */
|
||||
__swi_begin(0x3D2)
|
||||
int IsIconBarDisabled()
|
||||
|
|
@ -947,7 +948,7 @@ __swi_end(0x163, AllocEQueue, (malloc_func, mfree_func));
|
|||
* @param malloc_fn result of #malloc_adr
|
||||
* */
|
||||
__swi_begin(0x3EB)
|
||||
void *EDIT_SetEQueue(void *gui, const EDITQ *eq, int do_mfree, const void *malloc_fn)
|
||||
void EDIT_SetEQueue(void *gui, const EDITQ *eq, int do_mfree, const void *malloc_fn)
|
||||
__swi_end(0x3EB, EDIT_SetEQueue, (gui, eq, do_mfree, malloc_fn));
|
||||
|
||||
/**
|
||||
|
|
@ -1774,8 +1775,9 @@ __swi_end(0x3F8, Scrollbar_SetValue, (scrollbar, value));
|
|||
* */
|
||||
|
||||
/**
|
||||
* Pointer to the currently opened menu.
|
||||
* @return pointer
|
||||
* Key sequence buffer of the "menu anywhere" shortcut (`char[4]`).
|
||||
* @return pointer to the buffer
|
||||
* @note Not available on NSG.
|
||||
* */
|
||||
__swi_begin(0x80D8)
|
||||
void *RamMenuAnywhere()
|
||||
|
|
|
|||
|
|
@ -59,12 +59,14 @@ __swi_end(0x054, StrToInt, (s, endp));
|
|||
|
||||
/**
|
||||
* Convert HEX-string to int.
|
||||
* @param s string with HEX
|
||||
* @return int
|
||||
* The input may contain up to eight hexadecimal digits. Lowercase digits are converted to uppercase in place.
|
||||
* @param s mutable string with HEX
|
||||
* @param fallback value returned for an invalid digit or a string longer than eight characters
|
||||
* @return parsed value, or `fallback` on error
|
||||
* */
|
||||
__swi_begin(0x0AF)
|
||||
uint32_t HexToInt(const char *s)
|
||||
__swi_end(0x0AF, HexToInt, (s));
|
||||
uint32_t HexToInt(char *s, uint32_t fallback)
|
||||
__swi_end(0x0AF, HexToInt, (s, fallback));
|
||||
|
||||
/**
|
||||
* Convert HEX char to int.
|
||||
|
|
@ -218,8 +220,8 @@ __swi_end(0x245, Base64Decode, (inbuf, insize, outbuf, outsize, _null, unk5));
|
|||
* @return divident / divisor
|
||||
* */
|
||||
__swi_begin(0x0B8)
|
||||
int sdiv(int divisor, int divident)
|
||||
__swi_end(0x0B8, sdiv, (divisor, divident));
|
||||
int sdiv(int divisor, int dividend)
|
||||
__swi_end(0x0B8, sdiv, (divisor, dividend));
|
||||
|
||||
/**
|
||||
* Unsigned int div.
|
||||
|
|
@ -228,8 +230,8 @@ __swi_end(0x0B8, sdiv, (divisor, divident));
|
|||
* @return divident / divisor
|
||||
* */
|
||||
__swi_begin(0x0BC)
|
||||
uint32_t udiv(uint32_t divisor, uint32_t divident)
|
||||
__swi_end(0x0BC, udiv, (divisor, divident));
|
||||
uint32_t udiv(uint32_t divisor, uint32_t dividend)
|
||||
__swi_end(0x0BC, udiv, (divisor, dividend));
|
||||
|
||||
/**
|
||||
* Signed int div by 10.
|
||||
|
|
@ -237,8 +239,8 @@ __swi_end(0x0BC, udiv, (divisor, divident));
|
|||
* @return divident / 10
|
||||
* */
|
||||
__swi_begin(0x0BD)
|
||||
int DivBy10(int divident)
|
||||
__swi_end(0x0BD, DivBy10, (divident));
|
||||
int DivBy10(int dividend)
|
||||
__swi_end(0x0BD, DivBy10, (dividend));
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ __swi_end(0x122, wstrncat, (destination, source, num));
|
|||
/**
|
||||
* Locate first occurrence of character in WSHDR.
|
||||
* @param str WSHDR string
|
||||
* @param start position from which to start searching
|
||||
* @param start one-based position from which to start searching
|
||||
* @param character character to be located
|
||||
* @return position of the found character or -1
|
||||
* */
|
||||
|
|
@ -215,12 +215,12 @@ __swi_end(0x1DC, wstrchr, (str, start, character));
|
|||
/**
|
||||
* Locate last occurrence of character in WSHDR.
|
||||
* @param str WSHDR string
|
||||
* @param rstart position from which to start searching (from the end)
|
||||
* @param rstart one-based position from which to search backwards
|
||||
* @param character character to be located
|
||||
* @return position of the found character or 0xFFFF
|
||||
* @return position of the found character or -1
|
||||
* */
|
||||
__swi_begin(0x1DD)
|
||||
uint16_t wstrrchr(WSHDR *str, uint32_t rstart, uint32_t character)
|
||||
short wstrrchr(WSHDR *str, uint32_t rstart, uint32_t character)
|
||||
__swi_end(0x1DD, wstrrchr, (str, rstart, character));
|
||||
|
||||
/**
|
||||
|
|
@ -232,7 +232,7 @@ __swi_end(0x1DD, wstrrchr, (str, rstart, character));
|
|||
* @return >0 - the first character that does not match has a greater value in ptr1 than in ptr2
|
||||
* */
|
||||
__swi_begin(0x2E2)
|
||||
int wstrcmp(WSHDR *str1, WSHDR *str2)
|
||||
int wstrcmp(const WSHDR *str1, const WSHDR *str2)
|
||||
__swi_end(0x2E2, wstrcmp, (str1, str2));
|
||||
|
||||
/**
|
||||
|
|
@ -355,26 +355,26 @@ __swi_variadic_end(0x216, wstrcatprintf, s, format);
|
|||
* @param source input WSHDR to be converted to C-string
|
||||
* @param destination pointer to the destination C-string, which should be large enough to contain the source WSHDR
|
||||
* @param new_length pointer to which to write the length of the destination string
|
||||
* @param size maximum number of characters to be converted
|
||||
* @return destination string length
|
||||
* @param size size of the destination buffer, including space for the terminating null
|
||||
* @return 1 on success, 0 if the destination buffer is too small
|
||||
* */
|
||||
__swi_begin(0x1E2)
|
||||
int ws_2utf8(const WSHDR *source, char *destination, int *new_length, uint32_t size)
|
||||
__swi_end(0x1E2, ws_2utf8, (source, destination, new_length, size));
|
||||
|
||||
/**
|
||||
* Convert UTF-8 C-string to WHSDR.
|
||||
* Convert UTF-8 C-string to WSHDR.
|
||||
* @param destination pointer to the destination WSHDR, which should be large enough to contain the source string
|
||||
* @param source input C-string to be converted to WSHDR
|
||||
* @param size maximum number of characters to be converted
|
||||
* @return destination string length
|
||||
* @param size maximum number of source bytes to read
|
||||
* @return 1 on success, 0 on invalid or incomplete UTF-8 or insufficient destination capacity
|
||||
* */
|
||||
__swi_begin(0x1E3)
|
||||
int utf8_2ws(WSHDR *destination, const char *source, uint32_t size)
|
||||
__swi_end(0x1E3, utf8_2ws, (destination, source, size));
|
||||
|
||||
/**
|
||||
* Convert CP1252 (Latin) C-string to WHSDR.
|
||||
* Convert CP1252 (Latin) C-string to WSHDR.
|
||||
* @param destination pointer to the destination WSHDR, which should be large enough to contain the source string
|
||||
* @param source input C-string to be converted to WSHDR
|
||||
* @param size maximum number of characters to be converted
|
||||
|
|
|
|||
1529
swilib/patterns.toml
1529
swilib/patterns.toml
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue