Skip to content

Commit

Permalink
Fixes some compile errors: (#709)
Browse files Browse the repository at this point in the history
- ByteChunk was incorrectly forward declared
- CDI_END_OFFSET is unused and the compiler was complaining about this
- adds missing constant from tivadcc params.
  • Loading branch information
balazsracz authored Apr 23, 2023
1 parent 3e22e2e commit d195728
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion boards/ti-ek-tm4c123gxl-launchpad/HwInit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,10 @@ struct DccHwDefs {
static const int RAILCOM_CUTOUT_POST_DELTA_USEC = -16;
/// Adds this to the negative half after the railcom cutout is done.
static const int RAILCOM_CUTOUT_POST_NEGATIVE_DELTA_USEC = -4;

/// The DCC end of packet bit (after the cutout) has an asymmetry due to the
/// interrupt CPU latency, this constant tunes it to disappear. This time
/// gets deducted from the second half.
static const int RESYNC_DELAY_USEC = 7;

/** These timer blocks will be synchronized once per packet, when the
* deadband delay is set up. */
Expand Down
4 changes: 2 additions & 2 deletions src/openlcb/CompileCdiMain.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ void render_cdi_helper(const CdiType &t, string ns, string name)
printf("const char %s_DATA[] = R\"xmlpayload(%s)xmlpayload\";\n",
name.c_str(), payload.c_str());
printf("extern const size_t %s_SIZE;\n", name.c_str());
printf("const size_t %s_SIZE = sizeof(%s_DATA);\n", name.c_str(),
printf("extern const size_t %s_SIZE = sizeof(%s_DATA);\n", name.c_str(),
name.c_str());
printf("const size_t %s_END_OFFSET = %u;\n", name.c_str(),
printf("extern const size_t %s_END_OFFSET = %u;\n", name.c_str(),
(unsigned)t.end_offset());
printf("\n} // namespace %s\n\n", ns.c_str());
}
Expand Down
2 changes: 1 addition & 1 deletion src/openlcb/StreamReceiverInterface.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

template <class T> class FlowInterface;
template <class T> class Buffer;
class ByteChunk;
struct ByteChunk;
using ByteBuffer = Buffer<ByteChunk>;
using ByteSink = FlowInterface<ByteBuffer>;

Expand Down

0 comments on commit d195728

Please sign in to comment.