First draft

This commit is contained in:
2025-11-07 15:57:11 +00:00
commit f306df9daf
13 changed files with 502 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
#include "../../shared/incp/service.h"
#include "../../shared/incp/asn1/out/incp_generated.h"
#include "../../shared/bus/bus.h"
//In this example, TTC will be passive and will only reply to datareqs and pings
int main()
{
for (;;);
return 1;
}
// === SUBSYSTEM SPECIFIC INCP IMPLEMENTATIONS ===
err_t impl_transmit(endpoint_t destination, void *buf, size_t size)
{
bus_send(destination, buf, size);
}
err_t impl_populate_dataret(AnyData *data)
{
switch (data->kind)
{
case ttcRxTotal_PRESENT:
data->u.ttcRxTotal.bytes = 69; //LATER: Proper data
return ERR_SUCCESS;
case ttcTxTotal_PRESENT:
data->u.ttcTxTotal.bytes = 420; //LATER: Proper data
return ERR_SUCCESS;
default:
return ERR_NOT_MINE;
}
}
void impl_callback_dataret(endpoint_t source, AnyData *data)
{
//LATER: Do whatever
}
void impl_callback_pong(endpoint_t source, PingMsg *pong)
{
//LATER: Do whatever
}