Skip to content

Commit

Permalink
Merge pull request #16 from codefarmer3650/master
Browse files Browse the repository at this point in the history
 adding interfaces
  • Loading branch information
birdyou committed Feb 27, 2016
2 parents bcd6d14 + f12149b commit 1b3dc22
Show file tree
Hide file tree
Showing 14 changed files with 4,100 additions and 3,075 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*.pch

# Libraries
*.lib
*.a
*.la
*.lo
Expand Down
2,112 changes: 1,092 additions & 1,020 deletions BoardConfig/Image/common/ble_device_platform.hex

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Interface/Include/juma_sdk_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ void ble_device_start_advertising(void);
void ble_device_stop_advertising(void);
void ble_device_disconnect(void);
void ble_device_send(uint8_t type, uint32_t length, uint8_t* value);
uint8_t random_generate(void);
void serial_send(uint8_t* data, uint32_t length);
void serial_setup(uint8_t rx_pin, uint8_t tx_pin, uint32_t baudrate);
void spi_setup(spi_init_struct_t * spi_struct);
Expand Down
1 change: 1 addition & 0 deletions Interface/Include/juma_sdk_vectors.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ struct _system_descriptor_t {
void (*ble_device_stop_advertising)(void);
void (*ble_device_disconnect)(void);
void (*ble_device_send)(uint8_t type, uint32_t length, uint8_t* value);
uint8_t (*random_generate)(void);
void (*serial_send)(uint8_t* data, uint32_t length);
void (*serial_setup)(uint8_t rx_pin, uint8_t tx_pin, uint32_t baudrate);
void (*spi_setup)(spi_init_struct_t * spi_struct);
Expand Down
179 changes: 179 additions & 0 deletions Interface/Project/juma_sdk.uvoptx
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_optx.xsd">

<SchemaVersion>1.0</SchemaVersion>

<Header>### uVision Project, (C) Keil Software</Header>

<Extensions>
<cExt>*.c</cExt>
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
<nMigrate>0</nMigrate>
</Extensions>

<DaveTm>
<dwLowDateTime>0</dwLowDateTime>
<dwHighDateTime>0</dwHighDateTime>
</DaveTm>

<Target>
<TargetName>Library</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<TargetOption>
<CLKADS>16000000</CLKADS>
<OPTTT>
<gFlags>0</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>0</RunSim>
<RunTarget>1</RunTarget>
<RunAbUc>0</RunAbUc>
</OPTTT>
<OPTHX>
<HexSelection>1</HexSelection>
<FlashByte>65535</FlashByte>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
</OPTHX>
<OPTLEX>
<PageWidth>79</PageWidth>
<PageLength>66</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\build\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
<CreateAListing>1</CreateAListing>
<CreateLListing>1</CreateLListing>
<CreateIListing>0</CreateIListing>
<AsmCond>1</AsmCond>
<AsmSymb>1</AsmSymb>
<AsmXref>0</AsmXref>
<CCond>1</CCond>
<CCode>0</CCode>
<CListInc>0</CListInc>
<CSymb>0</CSymb>
<LinkerCodeListing>0</LinkerCodeListing>
</ListingPage>
<OPTXL>
<LMap>1</LMap>
<LComments>1</LComments>
<LGenerateSymbols>1</LGenerateSymbols>
<LLibSym>1</LLibSym>
<LLines>1</LLines>
<LLocSym>1</LLocSym>
<LPubSym>1</LPubSym>
<LXref>0</LXref>
<LExpSel>0</LExpSel>
</OPTXL>
<OPTFL>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>5</CpuCode>
<DebugOpt>
<uSim>0</uSim>
<uTrg>1</uTrg>
<sLdApp>1</sLdApp>
<sGomain>1</sGomain>
<sRbreak>1</sRbreak>
<sRwatch>1</sRwatch>
<sRmem>1</sRmem>
<sRfunc>1</sRfunc>
<sRbox>1</sRbox>
<tLdApp>1</tLdApp>
<tGomain>1</tGomain>
<tRbreak>1</tRbreak>
<tRwatch>1</tRwatch>
<tRmem>1</tRmem>
<tRfunc>0</tRfunc>
<tRbox>1</tRbox>
<tRtrace>1</tRtrace>
<sRSysVw>1</sRSysVw>
<tRSysVw>1</tRSysVw>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<nTsel>1</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>BIN\UL2CM3.DLL</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0nrf51xxx -FS00 -FL0200000 -FP0($$Device:nRF51822_xxAA$Flash\nrf51xxx.flm))</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<aLwin>0</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>0</viewmode>
<vrSel>0</vrSel>
<aSym>0</aSym>
<aTbox>0</aTbox>
<AscS1>0</AscS1>
<AscS2>0</AscS2>
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>0</bLintAuto>
</TargetOption>
</Target>

<Group>
<GroupName>Source</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>1</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\Source\juma_sdk_lib.c</PathWithFileName>
<FilenameWithoutPath>juma_sdk_lib.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>

</ProjectOpt>
4 changes: 4 additions & 0 deletions Interface/Source/juma_sdk_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ inline void ble_device_send(uint8_t type, uint32_t length, uint8_t* value)
{
sys->ble_device_send(type, length, value);
}
inline uint8_t random_generate(void)
{
return sys->random_generate();
}
inline void serial_send(uint8_t* data, uint32_t length)
{
sys->serial_send(data, length);
Expand Down
1 change: 1 addition & 0 deletions Interface/Source/juma_sdk_sys_vectors.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const system_descriptor_t sys = {
ble_device_stop_advertising,
ble_device_disconnect,
ble_device_send,
random_generate,
serial_send,
serial_setup,
spi_setup,
Expand Down
2 changes: 1 addition & 1 deletion Interface/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
['void', 'ble_device_stop_advertising', []],
['void', 'ble_device_disconnect', []],
['void', 'ble_device_send', [('uint8_t', 'type'), ('uint32_t', 'length'), ('uint8_t*', 'value')]],

['uint8_t', 'random_generate',[]],
#['void', 'hif_setup', [('uint8_t', 'rx_pin'), ('uint8_t', 'tx_pin')]],
#['void', 'hif_send', [('uint8_t*', 'data'), ('uint32_t', 'size')]],
['void', 'serial_send', [('uint8_t*', 'data'), ('uint32_t', 'length')]],
Expand Down
Loading

0 comments on commit 1b3dc22

Please sign in to comment.